From 8fb586f3ee3580169275a981b9af208f6261163c Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 9 Jan 2020 11:17:19 -0800 Subject: [PATCH] Fixes for the Telit time functions. ZD 9733 --- wolfcrypt/src/wc_port.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wolfcrypt/src/wc_port.c b/wolfcrypt/src/wc_port.c index 3fa146a76..a23d4449b 100644 --- a/wolfcrypt/src/wc_port.c +++ b/wolfcrypt/src/wc_port.c @@ -2115,7 +2115,7 @@ time_t wiced_pseudo_unix_epoch_time(time_t * timer) { time_t myTime = 0; INT32 fd = m2mb_rtc_open("/dev/rtc0", 0); - if (fd >= 0) { + if (fd != -1) { M2MB_RTC_TIMEVAL_T timeval; m2mb_rtc_ioctl(fd, M2MB_RTC_IOCTL_GET_TIMEVAL, &timeval); @@ -2131,7 +2131,7 @@ time_t wiced_pseudo_unix_epoch_time(time_t * timer) { time_t myTime = 0; INT32 fd = m2mb_rtc_open("/dev/rtc0", 0); - if (fd >= 0) { + if (fd != -1) { M2MB_RTC_TIMEVAL_T timeval; m2mb_rtc_ioctl(fd, M2MB_RTC_IOCTL_GET_TIMEVAL, &timeval); @@ -2148,7 +2148,7 @@ time_t wiced_pseudo_unix_epoch_time(time_t * timer) { double myTime = 0; INT32 fd = m2mb_rtc_open("/dev/rtc0", 0); - if (fd >= 0) { + if (fd != -1) { M2MB_RTC_TIMEVAL_T timeval; m2mb_rtc_ioctl(fd, M2MB_RTC_IOCTL_GET_TIMEVAL, &timeval);