diff options
Diffstat (limited to 'sysdeps/generic/futimesat.c')
-rw-r--r-- | sysdeps/generic/futimesat.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sysdeps/generic/futimesat.c b/sysdeps/generic/futimesat.c index 33d170862a..74ccd876e6 100644 --- a/sysdeps/generic/futimesat.c +++ b/sysdeps/generic/futimesat.c @@ -30,18 +30,14 @@ futimesat (fd, file, tvp) const char *file; const struct timeval tvp[2]; { - if (fd < 0 && fd != AT_FDCWD) + if (fd < 0 + && (file == NULL + || (fd != AT_FDCWD && file[0] != '/'))) { __set_errno (EBADF); return -1; } - if (file == NULL) - { - __set_errno (EINVAL); - return -1; - } - __set_errno (ENOSYS); return -1; } |