diff options
author | Denis Vlasenko | 2006-10-08 12:49:22 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-08 12:49:22 +0000 |
commit | 1385899416a4396385ad421ae1f532be7103738a (patch) | |
tree | fc4d14a910593d1235318bb36abe5e9f72d2039e /loginutils/addgroup.c | |
parent | 5625415085e68ac5e150f54e685417c866620d76 (diff) | |
download | busybox-1385899416a4396385ad421ae1f532be7103738a.zip busybox-1385899416a4396385ad421ae1f532be7103738a.tar.gz |
attempt to regularize atoi mess.
Diffstat (limited to 'loginutils/addgroup.c')
-rw-r--r-- | loginutils/addgroup.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 236dc10..0172e60 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c @@ -91,15 +91,14 @@ int addgroup_main(int argc, char **argv) /* check for min, max and missing args and exit on error */ opt_complementary = "-1:?2:?"; - if (getopt32(argc, argv, "g:", &group)) { - gid = bb_xgetlarg(group, 10, 0, LONG_MAX); + gid = xatoul_range(group, 0, (gid_t)ULONG_MAX); } /* move past the commandline options */ argv += optind; /* need to be root */ - if(geteuid()) { + if (geteuid()) { bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); } |