From 1385899416a4396385ad421ae1f532be7103738a Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 8 Oct 2006 12:49:22 +0000 Subject: attempt to regularize atoi mess. --- loginutils/addgroup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'loginutils/addgroup.c') diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 236dc1099..0172e6041 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); } -- cgit v1.2.3