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

@@ -55,7 +55,7 @@ touch(const char *str)
if (stat(str, &st) == 0) {
ut.actime = st.st_atime;
ut.modtime = t;
if (utime(str, &ut) == -1)
if (utime(str, &ut) < 0)
eprintf("utime %s:", str);
return;
}
@@ -64,7 +64,7 @@ touch(const char *str)
else if (cflag)
return;
if ((fd = open(str, O_CREAT|O_EXCL,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) == -1)
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0)
eprintf("open %s:", str);
close(fd);
touch(str);