X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Futimensat.c;h=185cb14c6b0bfabb943b9c3dd073babb8826ff67;hb=6a0fd2e2d7d6a7e787ada21ffbe5f8ac0e3a06f1;hp=0c52b24e040145e66188f5382a8cda2c540ec7ba;hpb=5d706a3590ab4b393e845a1d73787faaae48d408;p=gnulib.git diff --git a/lib/utimensat.c b/lib/utimensat.c index 0c52b24e0..185cb14c6 100644 --- a/lib/utimensat.c +++ b/lib/utimensat.c @@ -1,5 +1,5 @@ /* Set the access and modification time of a file relative to directory fd. - Copyright (C) 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -93,11 +93,11 @@ rpl_utimensat (int fd, char const *file, struct timespec const times[2], values. */ else if (times && ((times[0].tv_nsec != UTIME_NOW - && (times[0].tv_nsec < 0 - || times[0].tv_nsec >= 1000000000)) + && ! (0 <= times[0].tv_nsec + && times[0].tv_nsec < TIMESPEC_RESOLUTION)) || (times[1].tv_nsec != UTIME_NOW - && (times[1].tv_nsec < 0 - || times[1].tv_nsec >= 1000000000)))) + && ! (0 <= times[1].tv_nsec + && times[1].tv_nsec < TIMESPEC_RESOLUTION)))) { errno = EINVAL; return -1;