Chop one level of indentation
eprintf() will exit the program, no need to use the else construct.
This commit is contained in:
parent
b257f7a05f
commit
9694305e05
|
@ -28,7 +28,8 @@ cp(const char *s1, const char *s2)
|
||||||
if (stat(s1, &st) == 0 && S_ISDIR(st.st_mode)) {
|
if (stat(s1, &st) == 0 && S_ISDIR(st.st_mode)) {
|
||||||
if (!cp_rflag) {
|
if (!cp_rflag) {
|
||||||
eprintf("%s: is a directory\n", s1);
|
eprintf("%s: is a directory\n", s1);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
if(!(dp = opendir(s1)))
|
if(!(dp = opendir(s1)))
|
||||||
eprintf("opendir %s:", s1);
|
eprintf("opendir %s:", s1);
|
||||||
|
|
||||||
|
@ -54,10 +55,10 @@ cp(const char *s1, const char *s2)
|
||||||
fnck(ns1, ns2, cp);
|
fnck(ns1, ns2, cp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir(dp);
|
closedir(dp);
|
||||||
free(ns1);
|
free(ns1);
|
||||||
free(ns2);
|
free(ns2);
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(!(f1 = fopen(s1, "r")))
|
if(!(f1 = fopen(s1, "r")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user