summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/vdso/gettimeofday.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index cd3aacf1cf86..b676a9845def 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -129,10 +129,10 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
if (unlikely(ret))
return clock_gettime32_fallback(clock, res);
- if (likely(!ret)) {
- res->tv_sec = ts.tv_sec;
- res->tv_nsec = ts.tv_nsec;
- }
+ /* For ret == 0 */
+ res->tv_sec = ts.tv_sec;
+ res->tv_nsec = ts.tv_nsec;
+
return ret;
}
#endif /* BUILD_VDSO32 */
@@ -240,7 +240,7 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
if (unlikely(ret))
return clock_getres32_fallback(clock, res);
- if (likely(!ret && res)) {
+ if (likely(res)) {
res->tv_sec = ts.tv_sec;
res->tv_nsec = ts.tv_nsec;
}