From 4142d4dc661c85b731c21b3296a04d1c5b5c3367 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 27 Feb 2001 18:22:03 +0000 Subject: Patch from Vladimir N. Oleynik to save 128 bytes by moving error checking for some my_* functions to utility.c --- chmod_chown_chgrp.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'chmod_chown_chgrp.c') diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c index a458cf7..4fc9869 100644 --- a/chmod_chown_chgrp.c +++ b/chmod_chown_chgrp.c @@ -122,8 +122,6 @@ int chmod_chown_chgrp_main(int argc, char **argv) gid = strtoul(groupName, &p, 10); /* maybe it's already numeric */ if (groupName == p) gid = my_getgrnam(groupName); - if (gid == -1) - goto bad_group; } else { groupName = strchr(*argv, '.'); if (groupName == NULL) @@ -133,8 +131,6 @@ int chmod_chown_chgrp_main(int argc, char **argv) gid = strtoul(groupName, &p, 10); if (groupName == p) gid = my_getgrnam(groupName); - if (gid == -1) - goto bad_group; } else gid = -1; } @@ -145,9 +141,6 @@ int chmod_chown_chgrp_main(int argc, char **argv) uid = strtoul(*argv, &p, 10); /* if numeric ... */ if (*argv == p) uid = my_getpwnam(*argv); - if (uid == -1) { - error_msg_and_die( "unknown user name: %s", *argv); - } } } @@ -162,8 +155,6 @@ int chmod_chown_chgrp_main(int argc, char **argv) } return EXIT_SUCCESS; - bad_group: - error_msg_and_die( "unknown group name: %s", groupName); } /* -- cgit v1.1