diff options
| author | Meco Man <[email protected]> | 2022-07-01 03:00:53 -0400 |
|---|---|---|
| committer | guo <[email protected]> | 2022-07-01 15:51:28 +0800 |
| commit | 9623706effd3f2e3dd1315daa13bc8d0eea168c3 (patch) | |
| tree | 7f2f8a92f8a22588b1a428c72faad4789670f634 /components/libc/compilers | |
| parent | 6a05ddf63d1202456a37e970e5a9ab58370ed093 (diff) | |
Revert "解决将RT_NULL当做数字0使用的问题"
This reverts commit 6a05ddf63d1202456a37e970e5a9ab58370ed093.
Diffstat (limited to 'components/libc/compilers')
| -rw-r--r-- | components/libc/compilers/common/ctime.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)) |
