From 9623706effd3f2e3dd1315daa13bc8d0eea168c3 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Fri, 1 Jul 2022 03:00:53 -0400 Subject: Revert "解决将RT_NULL当做数字0使用的问题" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6a05ddf63d1202456a37e970e5a9ab58370ed093. --- components/libc/compilers/common/ctime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/libc/compilers') diff --git a/components/libc/compilers/common/ctime.c b/components/libc/compilers/common/ctime.c index 8d22dab0c0..6cef1e222d 100644 --- a/components/libc/compilers/common/ctime.c +++ b/components/libc/compilers/common/ctime.c @@ -180,7 +180,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *r) return RT_NULL; } - rt_memset(r, 0, sizeof(struct tm)); + rt_memset(r, RT_NULL, sizeof(struct tm)); r->tm_sec = work % 60; work /= 60; @@ -258,7 +258,7 @@ char* asctime_r(const struct tm *t, char *buf) return RT_NULL; } - rt_memset(buf, 0, 26); + rt_memset(buf, RT_NULL, 26); /* Checking input validity */ if ((int)rt_strlen(days) <= (t->tm_wday << 2) || (int)rt_strlen(months) <= (t->tm_mon << 2)) -- cgit v1.3.1