Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/ultrix fix previous, list ends in NULL, and don't...
details: https://anonhg.NetBSD.org/src/rev/233f8e32f5dc
branches: trunk
changeset: 791580:233f8e32f5dc
user: christos <christos%NetBSD.org@localhost>
date: Sat Nov 23 23:34:04 2013 +0000
description:
fix previous, list ends in NULL, and don't open-code
diffstat:
sys/compat/ultrix/ultrix_fs.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r 29a3c4e87e29 -r 233f8e32f5dc sys/compat/ultrix/ultrix_fs.c
--- a/sys/compat/ultrix/ultrix_fs.c Sat Nov 23 23:30:39 2013 +0000
+++ b/sys/compat/ultrix/ultrix_fs.c Sat Nov 23 23:34:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ultrix_fs.c,v 1.52 2013/11/23 16:15:25 riz Exp $ */
+/* $NetBSD: ultrix_fs.c,v 1.53 2013/11/23 23:34:04 christos Exp $ */
/*
* Copyright (c) 1995, 1997 Jonathan Stone
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.52 2013/11/23 16:15:25 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.53 2013/11/23 23:34:04 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -248,15 +248,16 @@
sizeof(*SCARG(uap, start)))) != 0)
goto bad;
mutex_enter(&mountlist_lock);
- for (skip = start, mp = mountlist.tqh_first;
- mp != (void*)&mountlist && skip-- > 0; mp = nmp)
- nmp = mp->mnt_list.tqe_next;
+ for (skip = start, mp = TAILQ_FIRST(&mountlist);
+ mp != TAILQ_END(&mountlist) && skip-- > 0;
+ mp = TAILQ_NEXT(mp, mnt_list))
+ continue;
mutex_exit(&mountlist_lock);
}
mutex_enter(&mountlist_lock);
- for (count = 0, mp = mountlist.tqh_first;
- mp != (void*)&mountlist && count < maxcount; mp = nmp) {
+ for (count = 0, mp = TAILQ_FIRST(&mountlist);
+ mp != TAILQ_END(&mountlist) && count < maxcount; mp = nmp) {
if (vfs_busy(mp, &nmp)) {
continue;
}
Home |
Main Index |
Thread Index |
Old Index