Print this page
10139 smatch fixes for usr/src/cmd/stat


 441                         if (pos == ptmp)
 442                                 pos = ppos;
 443                 }
 444                 }
 445 
 446                 nr_iodevs--;
 447         }
 448 
 449         /*
 450          * If we had a filter, and *nothing* passed the filter then we
 451          * don't want to fill the  remaining slots - it is just confusing
 452          * if we don that, it makes it look like the filter code is broken.
 453          */
 454         if ((df->if_nr_names == NULL) || (nr_iodevs != nr_iodevs_orig)) {
 455                 /* now insert any iodevs into the remaining slots */
 456                 pos = iodevs;
 457                 while (pos && nr_iodevs) {
 458                         tmp = pos;
 459                         pos = pos->is_next;
 460 
 461                         if (df && df->if_skip_floppy &&
 462                             strncmp(tmp->is_name, "fd", 2) == 0)
 463                                 continue;
 464 
 465                         list_del(&iodevs, tmp);
 466                         insert_iodev(ss, tmp);
 467 
 468                         --nr_iodevs;
 469                 }
 470         }
 471 
 472         /* clear the unwanted ones */
 473         pos = iodevs;
 474         while (pos) {
 475                 struct iodev_snapshot *tmp = pos;
 476                 pos = pos->is_next;
 477                 free_iodev(tmp);
 478         }
 479 }
 480 
 481 static int




 441                         if (pos == ptmp)
 442                                 pos = ppos;
 443                 }
 444                 }
 445 
 446                 nr_iodevs--;
 447         }
 448 
 449         /*
 450          * If we had a filter, and *nothing* passed the filter then we
 451          * don't want to fill the  remaining slots - it is just confusing
 452          * if we don that, it makes it look like the filter code is broken.
 453          */
 454         if ((df->if_nr_names == NULL) || (nr_iodevs != nr_iodevs_orig)) {
 455                 /* now insert any iodevs into the remaining slots */
 456                 pos = iodevs;
 457                 while (pos && nr_iodevs) {
 458                         tmp = pos;
 459                         pos = pos->is_next;
 460 
 461                         if (df->if_skip_floppy &&
 462                             strncmp(tmp->is_name, "fd", 2) == 0)
 463                                 continue;
 464 
 465                         list_del(&iodevs, tmp);
 466                         insert_iodev(ss, tmp);
 467 
 468                         --nr_iodevs;
 469                 }
 470         }
 471 
 472         /* clear the unwanted ones */
 473         pos = iodevs;
 474         while (pos) {
 475                 struct iodev_snapshot *tmp = pos;
 476                 pos = pos->is_next;
 477                 free_iodev(tmp);
 478         }
 479 }
 480 
 481 static int