diff options
author | phk <phk@FreeBSD.org> | 2001-02-04 16:08:18 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2001-02-04 16:08:18 +0000 |
commit | 709379c1aeaadc2770d45e2cb1bc6428c65f09d3 (patch) | |
tree | dfeb80ff1352759a12e59878a24ad037eef63ea0 /sys/kern | |
parent | e01468552648a6fc51185ba9e47435b0d00ff96f (diff) | |
download | FreeBSD-src-709379c1aeaadc2770d45e2cb1bc6428c65f09d3.zip FreeBSD-src-709379c1aeaadc2770d45e2cb1bc6428c65f09d3.tar.gz |
Another round of the <sys/queue.h> FOREACH transmogriffer.
Created with: sed(1)
Reviewed by: md5(1)
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_linker.c | 3 | ||||
-rw-r--r-- | sys/kern/subr_devstat.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_aio.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_init.c | 3 |
4 files changed, 5 insertions, 10 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index b286311..e24f171 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -574,8 +574,7 @@ linker_file_lookup_symbol(linker_file_t file, const char* name, int deps) */ struct common_symbol* cp; - for (cp = STAILQ_FIRST(&file->common); cp; - cp = STAILQ_NEXT(cp, link)) + STAILQ_FOREACH(cp, &file->common, link) if (!strcmp(cp->name, name)) { KLD_DPF(SYM, ("linker_file_lookup_symbol: old common value=%x\n", cp->address)); return cp->address; diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index 0d0942e..3c15b43 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -80,8 +80,7 @@ devstat_add_entry(struct devstat *ds, const char *dev_name, if (devstat_num_devs == 1) STAILQ_INSERT_TAIL(devstat_head, ds, dev_links); else { - for (ds_tmp = STAILQ_FIRST(devstat_head); ds_tmp != NULL; - ds_tmp = STAILQ_NEXT(ds_tmp, dev_links)) { + STAILQ_FOREACH(ds_tmp, devstat_head, dev_links) { struct devstat *ds_next; ds_next = STAILQ_NEXT(ds_tmp, dev_links); diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 65f4fbf..c16cc8c 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -2135,8 +2135,7 @@ lio_listio(struct proc *p, struct lio_listio_args *uap) jobref = fuword(&iocb->_aiocb_private.kernelinfo); - for (cb = TAILQ_FIRST(&ki->kaio_jobdone); cb; - cb = TAILQ_NEXT(cb, plist)) { + TAILQ_FOREACH(cb, &ki->kaio_jobdone, plist) { if (((intptr_t)cb->uaiocb._aiocb_private.kernelinfo) == jobref) { if (cb->uaiocb.aio_lio_opcode @@ -2157,8 +2156,7 @@ lio_listio(struct proc *p, struct lio_listio_args *uap) } s = splbio(); - for (cb = TAILQ_FIRST(&ki->kaio_bufdone); cb; - cb = TAILQ_NEXT(cb, plist)) { + TAILQ_FOREACH(cb, &ki->kaio_bufdone, plist) { if (((intptr_t)cb->uaiocb._aiocb_private.kernelinfo) == jobref) { found++; diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 3f36a5f..76d1155 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -331,8 +331,7 @@ vfs_register(struct vfsconf *vfc) * preserved by re-registering the oid after modifying its * number. */ - for (oidp = SLIST_FIRST(&sysctl__vfs_children); oidp; - oidp = SLIST_NEXT(oidp, oid_link)) + SLIST_FOREACH(oidp, &sysctl__vfs_children, oid_link) if (strcmp(oidp->oid_name, vfc->vfc_name) == 0) { sysctl_unregister_oid(oidp); oidp->oid_number = vfc->vfc_typenum; |