]> granicus.if.org Git - sudo/commitdiff
If path is NULL and fd == -1 return -1.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 7 Sep 2004 18:04:48 +0000 (18:04 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 7 Sep 2004 18:04:48 +0000 (18:04 +0000)
fileops.c

index 4ce877fe54761bc65549dd2d9f62d82e12fa5e83..643de5da31c7b2cc61b967509c97bfc9aa9eef21 100644 (file)
--- a/fileops.c
+++ b/fileops.c
@@ -58,7 +58,10 @@ touch(fd, path, when)
        return(futimes(fd, times));
     else
 #endif
+    if (path != NULL)
        return(utimes(path, times));
+    else
+       return(-1);
 }
 
 /*