summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2014-09-13 16:06:38 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2014-09-13 16:06:38 +0000
commitea858dabe0f76712b2416cf2288222c8cbba5028 (patch)
tree329401494d1f8b23d1f11679cf89acb4ae8c0e77 /sys/kern
parentbeb9041963b2a9e31afc7ab688f1da1a386cbf9c (diff)
Replace all queue *_END macro calls except CIRCLEQ_END with NULL.
CIRCLEQ_* is deprecated and not called in the tree. The other queue types have *_END macros which were added for symmetry with CIRCLEQ_END. They are defined as NULL. There's no reason to keep the other *_END macro calls. ok millert@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/spec_vnops.c5
-rw-r--r--sys/kern/subr_extent.c7
-rw-r--r--sys/kern/sysv_sem.c6
-rw-r--r--sys/kern/vfs_cache.c8
-rw-r--r--sys/kern/vfs_subr.c5
5 files changed, 13 insertions, 18 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index c4e8006353b..484e17a5e4b 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.78 2013/10/30 03:16:49 guenther Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.79 2014/09/13 16:06:37 doug Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -423,8 +423,7 @@ spec_fsync(void *v)
*/
loop:
s = splbio();
- for (bp = LIST_FIRST(&vp->v_dirtyblkhd);
- bp != LIST_END(&vp->v_dirtyblkhd); bp = nbp) {
+ for (bp = LIST_FIRST(&vp->v_dirtyblkhd); bp != NULL; bp = nbp) {
nbp = LIST_NEXT(bp, b_vnbufs);
if ((bp->b_flags & B_BUSY))
continue;
diff --git a/sys/kern/subr_extent.c b/sys/kern/subr_extent.c
index 3ff5210e6c3..55ef07123b6 100644
--- a/sys/kern/subr_extent.c
+++ b/sys/kern/subr_extent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_extent.c,v 1.52 2014/08/17 09:48:55 dlg Exp $ */
+/* $OpenBSD: subr_extent.c,v 1.53 2014/09/13 16:06:37 doug Exp $ */
/* $NetBSD: subr_extent.c,v 1.7 1996/11/21 18:46:34 cgd Exp $ */
/*-
@@ -272,8 +272,7 @@ extent_destroy(struct extent *ex)
#endif
/* Free all region descriptors in extent. */
- for (rp = LIST_FIRST(&ex->ex_regions);
- rp != LIST_END(&ex->ex_regions); ) {
+ for (rp = LIST_FIRST(&ex->ex_regions); rp != NULL; ) {
orp = rp;
rp = LIST_NEXT(rp, er_link);
LIST_REMOVE(orp, er_link);
@@ -697,7 +696,7 @@ extent_do_alloc(struct extent *ex, u_long substart, u_long subend,
if (last != NULL && last->er_end >= newstart)
newstart = extent_align((last->er_end + 1), alignment, skew);
- for (; rp != LIST_END(&ex->ex_regions); rp = LIST_NEXT(rp, er_link)) {
+ for (; rp != NULL; rp = LIST_NEXT(rp, er_link)) {
/*
* If the region pasts the subend, bail out and see
* if we fit against the subend.
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index ca8e25a3623..de70c0bd815 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysv_sem.c,v 1.49 2014/07/13 15:29:04 tedu Exp $ */
+/* $OpenBSD: sysv_sem.c,v 1.50 2014/09/13 16:06:37 doug Exp $ */
/* $NetBSD: sysv_sem.c,v 1.26 1996/02/09 19:00:25 christos Exp $ */
/*
@@ -184,11 +184,11 @@ void
semundo_clear(int semid, int semnum)
{
struct sem_undo *suptr = SLIST_FIRST(&semu_list);
- struct sem_undo *suprev = SLIST_END(&semu_list);
+ struct sem_undo *suprev = NULL;
struct undo *sunptr;
int i;
- while (suptr != SLIST_END(&semu_list)) {
+ while (suptr != NULL) {
sunptr = &suptr->un_ent[0];
for (i = 0; i < suptr->un_cnt; i++, sunptr++) {
if (sunptr->un_id == semid) {
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 4c82103fd07..a1775c27fd3 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_cache.c,v 1.36 2013/11/27 15:48:43 jsing Exp $ */
+/* $OpenBSD: vfs_cache.c,v 1.37 2014/09/13 16:06:37 doug Exp $ */
/* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */
/*
@@ -458,8 +458,7 @@ cache_purgevfs(struct mount *mp)
struct namecache *ncp, *nxtcp;
/* whack the regular entries */
- for (ncp = TAILQ_FIRST(&nclruhead); ncp != TAILQ_END(&nclruhead);
- ncp = nxtcp) {
+ for (ncp = TAILQ_FIRST(&nclruhead); ncp != NULL; ncp = nxtcp) {
if (ncp->nc_dvp == NULL || ncp->nc_dvp->v_mount != mp) {
nxtcp = TAILQ_NEXT(ncp, nc_lru);
continue;
@@ -470,8 +469,7 @@ cache_purgevfs(struct mount *mp)
nxtcp = TAILQ_FIRST(&nclruhead);
}
/* whack the negative entries */
- for (ncp = TAILQ_FIRST(&nclruneghead); ncp != TAILQ_END(&nclruneghead);
- ncp = nxtcp) {
+ for (ncp = TAILQ_FIRST(&nclruneghead); ncp != NULL; ncp = nxtcp) {
if (ncp->nc_dvp == NULL || ncp->nc_dvp->v_mount != mp) {
nxtcp = TAILQ_NEXT(ncp, nc_neg);
continue;
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index a26fbe2e851..7d0fffac230 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.218 2014/07/13 15:00:40 tedu Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.219 2014/09/13 16:06:37 doug Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -1887,8 +1887,7 @@ vflushbuf(struct vnode *vp, int sync)
loop:
s = splbio();
- for (bp = LIST_FIRST(&vp->v_dirtyblkhd);
- bp != LIST_END(&vp->v_dirtyblkhd); bp = nbp) {
+ for (bp = LIST_FIRST(&vp->v_dirtyblkhd); bp != NULL; bp = nbp) {
nbp = LIST_NEXT(bp, b_vnbufs);
if ((bp->b_flags & B_BUSY))
continue;