Module Name:    src
Committed By:   dholland
Date:           Mon Apr 18 00:46:39 UTC 2011

Modified Files:
        src/sys/kern: vfs_lookup.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/sys/kern/vfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_lookup.c
diff -u src/sys/kern/vfs_lookup.c:1.180 src/sys/kern/vfs_lookup.c:1.181
--- src/sys/kern/vfs_lookup.c:1.180	Mon Apr 18 00:46:14 2011
+++ src/sys/kern/vfs_lookup.c	Mon Apr 18 00:46:39 2011
@@ -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) {
 			/*

Reply via email to