aboutsummaryrefslogtreecommitdiff
path: root/chmod_chown_chgrp.c
diff options
context:
space:
mode:
Diffstat (limited to 'chmod_chown_chgrp.c')
-rw-r--r--chmod_chown_chgrp.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c
index a458cf77a..4fc986904 100644
--- a/chmod_chown_chgrp.c
+++ b/chmod_chown_chgrp.c
@@ -122,8 +122,6 @@ int chmod_chown_chgrp_main(int argc, char **argv)
122 gid = strtoul(groupName, &p, 10); /* maybe it's already numeric */ 122 gid = strtoul(groupName, &p, 10); /* maybe it's already numeric */
123 if (groupName == p) 123 if (groupName == p)
124 gid = my_getgrnam(groupName); 124 gid = my_getgrnam(groupName);
125 if (gid == -1)
126 goto bad_group;
127 } else { 125 } else {
128 groupName = strchr(*argv, '.'); 126 groupName = strchr(*argv, '.');
129 if (groupName == NULL) 127 if (groupName == NULL)
@@ -133,8 +131,6 @@ int chmod_chown_chgrp_main(int argc, char **argv)
133 gid = strtoul(groupName, &p, 10); 131 gid = strtoul(groupName, &p, 10);
134 if (groupName == p) 132 if (groupName == p)
135 gid = my_getgrnam(groupName); 133 gid = my_getgrnam(groupName);
136 if (gid == -1)
137 goto bad_group;
138 } else 134 } else
139 gid = -1; 135 gid = -1;
140 } 136 }
@@ -145,9 +141,6 @@ int chmod_chown_chgrp_main(int argc, char **argv)
145 uid = strtoul(*argv, &p, 10); /* if numeric ... */ 141 uid = strtoul(*argv, &p, 10); /* if numeric ... */
146 if (*argv == p) 142 if (*argv == p)
147 uid = my_getpwnam(*argv); 143 uid = my_getpwnam(*argv);
148 if (uid == -1) {
149 error_msg_and_die( "unknown user name: %s", *argv);
150 }
151 } 144 }
152 } 145 }
153 146
@@ -162,8 +155,6 @@ int chmod_chown_chgrp_main(int argc, char **argv)
162 } 155 }
163 return EXIT_SUCCESS; 156 return EXIT_SUCCESS;
164 157
165 bad_group:
166 error_msg_and_die( "unknown group name: %s", groupName);
167} 158}
168 159
169/* 160/*