Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern The "goto alldone" from a couple patches back (insi...
details: https://anonhg.NetBSD.org/src/rev/8aa9fa727abe
branches: trunk
changeset: 764371:8aa9fa727abe
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Apr 18 00:46:39 2011 +0000
description:
The "goto alldone" from a couple patches back (inside the loop) can
now be changed to a loop break and another null test and goto outside
the loop. In neither of the other two cases for exiting the loop can
foundobj be null.
diffstat:
sys/kern/vfs_lookup.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r c22f7b69c14d -r 8aa9fa727abe sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c Mon Apr 18 00:46:14 2011 +0000
+++ b/sys/kern/vfs_lookup.c Mon Apr 18 00:46:39 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_lookup.c,v 1.180 2011/04/18 00:46:14 dholland Exp $ */
+/* $NetBSD: vfs_lookup.c,v 1.181 2011/04/18 00:46:39 dholland Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.180 2011/04/18 00:46:14 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.181 2011/04/18 00:46:39 dholland Exp $");
#include "opt_magiclinks.h"
@@ -1184,11 +1184,11 @@
/*
* Success with no object returned means we're
* creating something and it isn't already
- * there. Jump out of the main loop now so
+ * there. Break out of the main loop now so
* the code below doesn't have to test for
* foundobj == NULL.
*/
- goto alldone;
+ break;
}
/*
@@ -1264,6 +1264,10 @@
break;
}
+ if (foundobj == NULL) {
+ goto alldone;
+ }
+
{
if (foundobj == ndp->ni_erootdir) {
/*
Home |
Main Index |
Thread Index |
Old Index