Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Use TAILQ_FOREACH().
details: https://anonhg.NetBSD.org/src/rev/701523bc3d5d
branches: trunk
changeset: 521316:701523bc3d5d
user: simonb <simonb%NetBSD.org@localhost>
date: Mon Jan 28 03:12:13 2002 +0000
description:
Use TAILQ_FOREACH().
diffstat:
sys/kern/subr_disk.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 09b93799c9d0 -r 701523bc3d5d sys/kern/subr_disk.c
--- a/sys/kern/subr_disk.c Mon Jan 28 02:16:56 2002 +0000
+++ b/sys/kern/subr_disk.c Mon Jan 28 03:12:13 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_disk.c,v 1.33 2002/01/27 12:41:08 simonb Exp $ */
+/* $NetBSD: subr_disk.c,v 1.34 2002/01/28 03:12:13 simonb Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999, 2000 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.33 2002/01/27 12:41:08 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.34 2002/01/28 03:12:13 simonb Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -609,8 +609,7 @@
memset(&sdisk, 0, sizeof(sdisk));
simple_lock(&disklist_slock);
- for (diskp = TAILQ_FIRST(&disklist); diskp != NULL;
- diskp = TAILQ_NEXT(diskp, dk_link)) {
+ TAILQ_FOREACH(diskp, &disklist, dk_link) {
if (left < sizeof(struct disk_sysctl))
break;
strncpy(sdisk.dk_name, diskp->dk_name, sizeof(sdisk.dk_name));;
Home |
Main Index |
Thread Index |
Old Index