diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-02 23:09:16 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-02 23:09:16 +0100 |
commit | 1043d24e77f82d729996fe8192b078e567b16113 (patch) | |
tree | d8b3fe4054f14501322b7b55657b2ce56020edc1 /libc/misc | |
parent | 779c35b7c4e47d9fc8f69ee582e822a2f6f45411 (diff) |
remove two checks for gettimeofday error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/time/ftime.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/misc/time/ftime.c b/libc/misc/time/ftime.c index b2273860c..ff78d418a 100644 --- a/libc/misc/time/ftime.c +++ b/libc/misc/time/ftime.c @@ -25,8 +25,10 @@ int ftime(struct timeb *timebuf) struct timeval tv; struct timezone tz; - if (gettimeofday (&tv, &tz) < 0) - return -1; + /* In Linux, gettimeofday fails only on bad parameter. + * We know that here parameters aren't bad. + */ + gettimeofday (&tv, &tz); timebuf->time = tv.tv_sec; timebuf->millitm = (tv.tv_usec + 999) / 1000; |