diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-29 17:21:44 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-29 17:21:44 +0000 |
commit | 37016136c9f2a3260509bf71aab6853e07a46527 (patch) | |
tree | db0eb51f8967cec0f3acff828a778ed42b44b0f4 /lib | |
parent | 346afb38abf2591e3c1e591bb5d7d6585523c48a (diff) | |
download | coreutils-37016136c9f2a3260509bf71aab6853e07a46527.tar.xz |
(settime): If settimeofday fails, give up right away.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/settime.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/settime.c b/lib/settime.c index 8a775ee9a..1d4098730 100644 --- a/lib/settime.c +++ b/lib/settime.c @@ -53,13 +53,10 @@ settime (struct timespec const *ts) #if HAVE_SETTIMEOFDAY { struct timeval tv; - int r; tv.tv_sec = ts->tv_sec; tv.tv_usec = ts->tv_nsec / 1000; - r = settimeofday (&tv, 0); - if (r == 0 || errno == EPERM) - return r; + return settimeofday (&tv, 0); } #elif HAVE_STIME /* This fails to compile on OSF1 V5.1, due to stime requiring |