From 93dc830ecbbcd243760848e27a0f901125432b04 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 10 Sep 2020 13:09:22 +0300 Subject: 13129 libc: gettimeofday() error: unchecked function return Reviewed by: Marco van Wieringen Reviewed by: Patrick Mooney Approved by: Robert Mustacchi --- usr/src/lib/libc/i386/sys/gettimeofday.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr/src/lib/libc/i386/sys') diff --git a/usr/src/lib/libc/i386/sys/gettimeofday.c b/usr/src/lib/libc/i386/sys/gettimeofday.c index c2396e582a..a4c62aeb68 100644 --- a/usr/src/lib/libc/i386/sys/gettimeofday.c +++ b/usr/src/lib/libc/i386/sys/gettimeofday.c @@ -40,9 +40,10 @@ gettimeofday(struct timeval *tv, void *tz) * and layout of their members, the conversion can be done in-place. */ if (cp != NULL && __cp_can_gettime(cp) != 0) { - __cp_clock_gettime_realtime(cp, (struct timespec *)tv); + (void) __cp_clock_gettime_realtime(cp, (struct timespec *)tv); } else { - __clock_gettime_sys(CLOCK_REALTIME, (struct timespec *)tv); + (void) __clock_gettime_sys(CLOCK_REALTIME, + (struct timespec *)tv); } /* Convert from tv_nsec to tv_usec */ tv->tv_usec /= 1000; -- cgit v1.2.3