diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2013-09-26 10:37:16 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2013-09-26 10:37:16 +0300 |
| commit | b87c4ff2817e71ca71b028792200b1e069a95e04 (patch) | |
| tree | bfe00c0655fa02078a9ab2c633ea06d90c4a2064 /lib/utimens.c | |
| parent | bbc108377873aa6ed7cf21c731770103096eea39 (diff) | |
| parent | ba355de014b75ed104da4777f909db70d62f2357 (diff) | |
| download | emacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz | |
Merge from trunk.
Diffstat (limited to 'lib/utimens.c')
| -rw-r--r-- | lib/utimens.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/utimens.c b/lib/utimens.c index 013843d6da4..44a33c1d791 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -90,10 +90,12 @@ validate_timespec (struct timespec timespec[2]) assert (timespec); if ((timespec[0].tv_nsec != UTIME_NOW && timespec[0].tv_nsec != UTIME_OMIT - && (timespec[0].tv_nsec < 0 || 1000000000 <= timespec[0].tv_nsec)) + && ! (0 <= timespec[0].tv_nsec + && timespec[0].tv_nsec < TIMESPEC_RESOLUTION)) || (timespec[1].tv_nsec != UTIME_NOW && timespec[1].tv_nsec != UTIME_OMIT - && (timespec[1].tv_nsec < 0 || 1000000000 <= timespec[1].tv_nsec))) + && ! (0 <= timespec[1].tv_nsec + && timespec[1].tv_nsec < TIMESPEC_RESOLUTION))) { errno = EINVAL; return -1; |
