Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2012 17:40:17 +0300
From:      Mitya <mitya@cabletv.dp.ua>
To:        freebsd-scsi@freebsd.org
Subject:   variable generation in struct periph_driver
Message-ID:  <502A6351.8000904@cabletv.dp.ua>

next in thread | raw e-mail | index | archive | help
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 ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?502A6351.8000904>