Use < 0 instead of == -1

This commit is contained in:
FRIGN
2014-11-19 20:59:37 +01:00
committed by sin
parent 9b38355ae8
commit 1436518f9d
21 changed files with 41 additions and 41 deletions

View File

@@ -66,7 +66,7 @@ cp(const char *s1, const char *s2)
if (!(dp = opendir(s1)))
eprintf("opendir %s:", s1);
if (mkdir(s2, st.st_mode) == -1 && errno != EEXIST)
if (mkdir(s2, st.st_mode) < 0 && errno != EEXIST)
eprintf("mkdir %s:", s2);
apathmax(&ns1, &size1);
@@ -144,7 +144,7 @@ preserve:
r = lchown(s2, st.st_uid, st.st_gid);
else
r = chown(s2, st.st_uid, st.st_gid);
if (r == -1) {
if (r < 0) {
weprintf("cp: can't preserve ownership of '%s':", s2);
cp_status = 1;
}