diff options
Diffstat (limited to 'coreutils/chgrp.c')
-rw-r--r-- | coreutils/chgrp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index 2f3fa41..8c969d7 100644 --- a/coreutils/chgrp.c +++ b/coreutils/chgrp.c @@ -59,10 +59,7 @@ int chgrp_main(int argc, char **argv) argv += optind; /* Find the selected group */ - gid = strtoul(*argv, &p, 10); /* maybe it's already numeric */ - if (*p || (p == *argv)) { /* trailing chars or nonnumeric */ - gid = my_getgrnam(*argv); - } + gid = get_ug_id(*argv, my_getgrnam); ++argv; /* Ok, ready to do the deed now */ |