diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2010-02-05 11:10:14 -0800 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2010-02-05 11:10:32 -0800 |
commit | f7eba78a7464c7b31326abf92dab254608835028 (patch) | |
tree | 5558a9e8d2c7c4484387030427701d81bd8b83e5 /libc/sysdeps/linux/common/clock_gettime.c | |
parent | 3e808a4c28f214314e8457672fae0f5d17f5450a (diff) | |
parent | df1580676a48dc3a9faf7e508ad3ec822a8e5a05 (diff) |
Merge commit 'origin/master' into nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/sysdeps/linux/common/clock_gettime.c')
-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: |