From 192c35f6eb2bb85e28c697a45c7d80a43ec6e743 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 2 Sep 2004 22:22:17 +0000 Subject: Tito writes: The second patch contains: 1) a size optimization for adduser.c 2) removes a warning about an unused variable in syslogd.c if CONFIG_FEATURE_REMOTE_LOG is not set 3)cosmetic fixes for addgroup_full_usage and adduser_full_usage Ciao, Tito --- loginutils/adduser.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'loginutils') diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 7687888..7fa05a0 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -305,13 +305,8 @@ int adduser_main(int argc, char **argv) if (usegroup) { /* Add user to a group that already exists */ - struct group *g; - - g = getgrnam(usegroup); - if (g == NULL) - bb_error_msg_and_die("group %s does not exist", usegroup); - - pw.pw_gid = g->gr_gid; + pw.pw_gid = my_getgrnam(usegroup); + /* exits on error */ } /* grand finale */ -- cgit v1.1