Imported Upstream version 1.7.6p1
[debian/sudo] / fileops.c
index ca4903fe0987aef66da165e446573ebbcd0c67d3..ae9a7df135c6d48da8b0ebc0b96722f425f57466 100644 (file)
--- a/fileops.c
+++ b/fileops.c
@@ -44,7 +44,7 @@
 # include <time.h>
 #endif
 #ifndef HAVE_TIMESPEC
-# include <emul/timespec.h>
+# include "emul/timespec.h"
 #endif
 
 #include "sudo.h"
@@ -71,13 +71,13 @@ touch(fd, path, tvp)
 
 #if defined(HAVE_FUTIME) || defined(HAVE_FUTIMES)
     if (fd != -1)
-       return(futimes(fd, tvp ? times : NULL));
+       return futimes(fd, tvp ? times : NULL);
     else
 #endif
     if (path != NULL)
-       return(utimes(path, tvp ? times : NULL));
+       return utimes(path, tvp ? times : NULL);
     else
-       return(-1);
+       return -1;
 }
 
 /*
@@ -102,7 +102,7 @@ lock_file(fd, lockit)
            op = F_ULOCK;
            break;
     }
-    return(lockf(fd, op, 0) == 0);
+    return lockf(fd, op, 0) == 0;
 }
 #elif HAVE_FLOCK
 int
@@ -123,7 +123,7 @@ lock_file(fd, lockit)
            op = LOCK_UN;
            break;
     }
-    return(flock(fd, op) == 0);
+    return flock(fd, op) == 0;
 }
 #else
 int
@@ -142,9 +142,9 @@ lock_file(fd, lockit)
     lock.l_whence = SEEK_SET;
     func = (lockit == SUDO_LOCK) ? F_SETLKW : F_SETLK;
 
-    return(fcntl(fd, func, &lock) == 0);
+    return fcntl(fd, func, &lock) == 0;
 #else
-    return(TRUE);
+    return TRUE;
 #endif
 }
 #endif
@@ -170,8 +170,8 @@ sudo_parseln(fp)
        len = strlen(buf);
        while (len > 0 && isspace((unsigned char)buf[len - 1]))
            buf[--len] = '\0';
-       for (cp = buf; isblank(*cp); cp++)
+       for (cp = buf; isblank((unsigned char)*cp); cp++)
            continue;
     }
-    return(cp);
+    return cp;
 }