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/sysdeps | |
parent | 779c35b7c4e47d9fc8f69ee582e822a2f6f45411 (diff) |
remove two checks for gettimeofday error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libc/sysdeps')
-rw-r--r-- | libc/sysdeps/linux/common/clock_gettime.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/common/clock_gettime.c b/libc/sysdeps/linux/common/clock_gettime.c index 888cd64b0..d3755a7a8 100644 --- a/libc/sysdeps/linux/common/clock_gettime.c +++ b/libc/sysdeps/linux/common/clock_gettime.c @@ -23,10 +23,12 @@ int clock_gettime(clockid_t clock_id, struct timespec* tp) switch (clock_id) { case CLOCK_REALTIME: - retval = gettimeofday(&tv, NULL); - if (retval == 0) { - TIMEVAL_TO_TIMESPEC(&tv, tp); - } + /* In Linux, gettimeofday fails only on bad parameter. + * We know that here parameter isn't bad. + */ + gettimeofday(&tv, NULL); + TIMEVAL_TO_TIMESPEC(&tv, tp); + retval = 0; break; default: |