summaryrefslogtreecommitdiff
path: root/components/libc
diff options
context:
space:
mode:
Diffstat (limited to 'components/libc')
-rw-r--r--components/libc/compilers/common/ctime.c4
-rw-r--r--components/libc/posix/pthreads/pthread.c2
2 files changed, 3 insertions, 3 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))
diff --git a/components/libc/posix/pthreads/pthread.c b/components/libc/posix/pthreads/pthread.c
index 355cbf0f8f..a7dcc9ee7c 100644
--- a/components/libc/posix/pthreads/pthread.c
+++ b/components/libc/posix/pthreads/pthread.c
@@ -136,7 +136,7 @@ void _pthread_data_destroy(_pthread_data_t *ptd)
ptd->magic = 0x0;
/* clear the "ptd->tid->user_data" */
- ptd->tid->user_data = 0;
+ ptd->tid->user_data = RT_NULL;
/* free ptd */
rt_free(ptd);