variable generation in struct periph_driver

Mitya mitya at cabletv.dp.ua
Tue Aug 14 15:30:52 UTC 2012


Hi. I found some logical inconsistency in file cam_periph.c in function 
cam_periph_alloc()

         if (cur_periph != NULL) {
                 KASSERT(cur_periph->unit_number != periph->unit_number, 
("duplic
ate units on periph list"));
                 TAILQ_INSERT_BEFORE(cur_periph, periph, unit_links);
         } else {
                 TAILQ_INSERT_TAIL(&(*p_drv)->units, periph, unit_links);
                 (*p_drv)->generation++;
         }

Why variable "generation" increments only in second condition ?


More information about the freebsd-scsi mailing list