aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-05-16 14:30:26 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-05-16 14:30:26 +0200
commit351fec332a074cc7599e34c70e00f53d8ef74df9 (patch)
treefedbf34e42caa14c261e3b3321ae07f799391197 /libbb
parentd83aff1aeddeb617f4cd3303bee220306005d0af (diff)
downloadbusybox-351fec332a074cc7599e34c70e00f53d8ef74df9.tar.gz
busybox.conf: code shrink
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/appletlib.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 86b5cd381..30224ed94 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -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;