Index: kern_clock.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_clock.c,v retrieving revision 1.181 diff -u -r1.181 kern_clock.c --- kern_clock.c 27 Oct 2005 17:22:47 -0000 1.181 +++ kern_clock.c 1 Nov 2005 15:47:33 -0000 @@ -261,7 +261,7 @@ */ mtx_lock_spin_flags(&callout_lock, MTX_QUIET); ticks++; - if (TAILQ_FIRST(&callwheel[ticks & callwheelmask]) != NULL) { + if (!TAILQ_EMPTY(&callwheel[ticks & callwheelmask])) { need_softclock = 1; } else if (softticks + 1 == ticks) ++softticks; Index: subr_disk.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_disk.c,v retrieving revision 1.85 diff -u -r1.85 subr_disk.c --- subr_disk.c 15 Jun 2005 23:32:07 -0000 1.85 +++ subr_disk.c 1 Nov 2005 15:42:15 -0000 @@ -99,7 +99,7 @@ bioq_insert_head(struct bio_queue_head *head, struct bio *bp) { - if (TAILQ_FIRST(&head->queue) == NULL) + if (TAILQ_EMPTY(&head->queue)) head->insert_point = bp; TAILQ_INSERT_HEAD(&head->queue, bp, bio_queue); } @@ -108,7 +108,7 @@ bioq_insert_tail(struct bio_queue_head *head, struct bio *bp) { - if (TAILQ_FIRST(&head->queue) == NULL) + if (TAILQ_EMPTY(&head->queue)) head->insert_point = bp; TAILQ_INSERT_TAIL(&head->queue, bp, bio_queue); } Index: vfs_aio.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_aio.c,v retrieving revision 1.199 diff -u -r1.199 vfs_aio.c --- vfs_aio.c 30 Oct 2005 02:12:49 -0000 1.199 +++ vfs_aio.c 1 Nov 2005 15:43:22 -0000 @@ -658,10 +658,10 @@ * If we've slept, jobs might have moved from one queue to another. * Retry rundown if we didn't manage to empty the queues. */ - if (TAILQ_FIRST(&ki->kaio_jobdone) != NULL || - TAILQ_FIRST(&ki->kaio_jobqueue) != NULL || - TAILQ_FIRST(&ki->kaio_bufqueue) != NULL || - TAILQ_FIRST(&ki->kaio_bufdone) != NULL) + if (!TAILQ_EMPTY(&ki->kaio_jobdone) || + !TAILQ_EMPTY(&ki->kaio_jobqueue) || + !TAILQ_EMPTY(&ki->kaio_bufqueue) || + !TAILQ_EMPTY(&ki->kaio_bufdone)) goto restart1; for (lj = TAILQ_FIRST(&ki->kaio_liojoblist); lj; lj = ljn) { Index: vfs_bio.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_bio.c,v retrieving revision 1.498 diff -u -r1.498 vfs_bio.c --- vfs_bio.c 31 Oct 2005 15:41:25 -0000 1.498 +++ vfs_bio.c 1 Nov 2005 15:45:24 -0000 @@ -1136,7 +1136,7 @@ * cache the buffer. */ bp->b_flags |= B_INVAL; - if (LIST_FIRST(&bp->b_dep) != NULL) + if (!LIST_EMPTY(&bp->b_dep)) buf_deallocate(bp); if (bp->b_flags & B_DELWRI) { atomic_subtract_int(&numdirtybuffers, 1); @@ -1793,7 +1793,7 @@ crfree(bp->b_wcred); bp->b_wcred = NOCRED; } - if (LIST_FIRST(&bp->b_dep) != NULL) + if (!LIST_EMPTY(&bp->b_dep)) buf_deallocate(bp); if (bp->b_vflags & BV_BKGRDINPROG) panic("losing buffer 3"); @@ -2077,7 +2077,7 @@ continue; } - if (LIST_FIRST(&bp->b_dep) != NULL && buf_countdeps(bp, 0)) { + if (!LIST_EMPTY(&bp->b_dep) && buf_countdeps(bp, 0)) { if (flushdeps == 0) { BUF_UNLOCK(bp); continue; @@ -2396,7 +2396,7 @@ bp->b_flags |= B_NOCACHE; bwrite(bp); } else { - if (LIST_FIRST(&bp->b_dep) == NULL) { + if (LIST_EMPTY(&bp->b_dep)) { bp->b_flags |= B_RELBUF; brelse(bp); } else { @@ -3052,7 +3052,7 @@ bufobj_wdrop(dropobj); return; } - if (LIST_FIRST(&bp->b_dep) != NULL) + if (!LIST_EMPTY(&bp->b_dep)) buf_complete(bp); if (bp->b_flags & B_VMIO) { Index: vfs_cluster.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_cluster.c,v retrieving revision 1.169 diff -u -r1.169 vfs_cluster.c --- vfs_cluster.c 31 Oct 2005 15:41:25 -0000 1.169 +++ vfs_cluster.c 1 Nov 2005 15:48:28 -0000 @@ -882,7 +882,7 @@ tbp->b_flags &= ~B_DONE; } /* end of code for non-first buffers only */ /* check for latent dependencies to be handled */ - if ((LIST_FIRST(&tbp->b_dep)) != NULL) { + if (!LIST_EMPTY(&tbp->b_dep)) { tbp->b_iocmd = BIO_WRITE; buf_start(tbp); }