busybox.conf: code shrink
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 16 May 2011 12:30:26 +0000 (14:30 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 16 May 2011 12:30:26 +0000 (14:30 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/appletlib.c

index 86b5cd381e58336b913d20f62d246354603e0f8b..30224ed945c6c7166417983ea59351478ff3c8bf 100644 (file)
@@ -440,19 +440,18 @@ static void parse_config_file(void)
                                /* Now get the user/group info. */
 
                                s = skip_whitespace(e);
-                               if (*s == '\0')
-                                       s = strcpy(buffer, "0.0");
-
-                               /* We require whitespace between mode and USER.GROUP */
-                               if ((s == e) || !(e = strchr(s, '.'))) {
-                                       errmsg = "uid.gid";
-                                       goto pe_label;
-                               }
-
-                               *e = ':'; /* get_uidgid needs USER:GROUP syntax */
-                               if (get_uidgid(&sct->m_ugid, s, /*allow_numeric:*/ 1) == 0) {
-                                       errmsg = "unknown user/group";
-                                       goto pe_label;
+                               /* Default is 0.0, else parse USER.GROUP: */
+                               if (*s) {
+                                       /* We require whitespace between mode and USER.GROUP */
+                                       if ((s == e) || !(e = strchr(s, '.'))) {
+                                               errmsg = "uid.gid";
+                                               goto pe_label;
+                                       }
+                                       *e = ':'; /* get_uidgid needs USER:GROUP syntax */
+                                       if (get_uidgid(&sct->m_ugid, s, /*allow_numeric:*/ 1) == 0) {
+                                               errmsg = "unknown user/group";
+                                               goto pe_label;
+                                       }
                                }
                        }
                        continue;