svn commit: trunk/busybox/miscutils

aldot at busybox.net aldot at busybox.net
Wed Dec 21 15:07:31 UTC 2005


Author: aldot
Date: 2005-12-21 07:07:30 -0800 (Wed, 21 Dec 2005)
New Revision: 12967

Log:
- fix check for group and user, remove some whitespace while at it.


Modified:
   trunk/busybox/miscutils/makedevs.c


Changeset:
Modified: trunk/busybox/miscutils/makedevs.c
===================================================================
--- trunk/busybox/miscutils/makedevs.c	2005-12-21 15:03:31 UTC (rev 12966)
+++ trunk/busybox/miscutils/makedevs.c	2005-12-21 15:07:30 UTC (rev 12967)
@@ -86,7 +86,7 @@
 	int ret = EXIT_SUCCESS;
 
 	unsigned long flags;
-   	flags = bb_getopt_ulflags(argc, argv, "d:", &line);
+	flags = bb_getopt_ulflags(argc, argv, "d:", &line);
 	if (line)
 		table = bb_xfopen(line, "r");
 
@@ -138,9 +138,9 @@
 		if (name[0] == '#') {
 			continue;
 		}
-		
-		gid = group ? get_ug_id(group, bb_xgetgrnam) : getgid();
-		uid = user ? get_ug_id(user, bb_xgetpwnam) : getuid();
+
+		gid = (*group) ? get_ug_id(group, bb_xgetgrnam) : getgid();
+		uid = (*user) ? get_ug_id(user, bb_xgetpwnam) : getuid();
 		full_name = concat_path_file(rootdir, name);
 
 		if (type == 'd') {




More information about the busybox-cvs mailing list