summaryrefslogtreecommitdiff
path: root/libc/misc/time/ftime.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/time/ftime.c')
-rw-r--r--libc/misc/time/ftime.c6
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;