From 9582205bd8b8c4ea9bfdc9b22f64806c70069765 Mon Sep 17 00:00:00 2001 From: ambrumf <421653227@qq.com> Date: Thu, 12 Oct 2023 09:43:07 +0800 Subject: [PATCH] fix time bug --- Ubiquitous/XiZi_IIoT/lib/newlib/time_syscalls.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Ubiquitous/XiZi_IIoT/lib/newlib/time_syscalls.c b/Ubiquitous/XiZi_IIoT/lib/newlib/time_syscalls.c index 10f1efcb6..c98e01c57 100644 --- a/Ubiquitous/XiZi_IIoT/lib/newlib/time_syscalls.c +++ b/Ubiquitous/XiZi_IIoT/lib/newlib/time_syscalls.c @@ -16,7 +16,9 @@ time_t time(time_t *t) { - NULL_PARAM_CHECK(t); + if (NULL == t) { + return 0; + } time_t current = 0; #ifdef RESOURCES_RTC @@ -30,5 +32,4 @@ time_t time(time_t *t) *t = current; return current; -} - +} \ No newline at end of file