PERFORCE change 163092 for review

Marko Zec zec at FreeBSD.org
Sat May 30 16:09:15 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=163092

Change 163092 by zec at 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 */


More information about the p4-projects mailing list