make_directory() will fail instantly so we dont need to test for failure here
This commit is contained in:
parent
891ee641cb
commit
924f93e848
@ -35,7 +35,6 @@ extern int mkdir_main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
mode_t mode = -1;
|
mode_t mode = -1;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
int status = 0;
|
|
||||||
int i, opt;
|
int i, opt;
|
||||||
|
|
||||||
while ((opt = getopt (argc, argv, "m:p")) != -1) {
|
while ((opt = getopt (argc, argv, "m:p")) != -1) {
|
||||||
@ -56,9 +55,9 @@ extern int mkdir_main (int argc, char **argv)
|
|||||||
if (optind == argc)
|
if (optind == argc)
|
||||||
show_usage ();
|
show_usage ();
|
||||||
|
|
||||||
for (i = optind; i < argc; i++)
|
for (i = optind; i < argc; i++) {
|
||||||
if (make_directory (argv[i], mode, flags) < 0)
|
make_directory (argv[i], mode, flags);
|
||||||
status = 1;
|
}
|
||||||
|
|
||||||
return status;
|
return(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user