Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 2009 16:09:13 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 163092 for review
Message-ID:  <200905301609.n4UG9DqQ067320@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163092

Change 163092 by zec@zec_tpx32 on 2009/05/30 16:09:10

	Improve style.

Affected files ...

.. //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#47 edit

Differences ...

==== //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#47 (text+ko) ====

@@ -268,7 +268,6 @@
 				return (ENOMEM);
 		}
 	}
-
 	return (error);
 }
 
@@ -297,23 +296,24 @@
 		next_name++;
 		if (namelen == 0) {
 			if (strlen(next_name) == 0)
-				return(top);	/* '.' == this vimage */
+				return (top);	/* '.' == this vimage */
 			else
-				return(NULL);
+				return (NULL);
 		}
 	} else
 		namelen = strlen(name);
 	if (namelen == 0)
-		return(NULL);
-	LIST_FOREACH(vip, &top->vi_child_head, vi_sibling)
+		return (NULL);
+	LIST_FOREACH(vip, &top->vi_child_head, vi_sibling) {
 		if (strlen(vip->vi_name) == namelen &&
 		    strncmp(name, vip->vi_name, namelen) == 0) {
 			if (next_name != NULL)
-				return(vimage_by_name(vip, next_name));
+				return (vimage_by_name(vip, next_name));
 			else
-				return(vip);
+				return (vip);
 		}
-	return(NULL);
+	}
+	return (NULL);
 }
 
 static void
@@ -355,21 +355,21 @@
 		/* Try to go deeper in the hierarchy */
 		next = LIST_FIRST(&where->vi_child_head);
 		if (next != NULL)
-			return(next);
+			return (next);
 	}
 
 	do {
 		/* Try to find next sibling */
 		next = LIST_NEXT(where, vi_sibling);
 		if (!recurse || next != NULL)
-			return(next);
+			return (next);
 
 		/* Nothing left on this level, go one level up */
 		where = where->vi_parent;
 	} while (where != top->vi_parent);
 
 	/* Nothing left to be visited, we are done */
-	return(NULL);
+	return (NULL);
 }
 
 #endif /* VIMAGE */ /* User interface block */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905301609.n4UG9DqQ067320>