projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
remove LFS64 programming interfaces (macro-only) from _GNU_SOURCE
[musl]
/
src
/
time
/
ctime_r.c
diff --git
a/src/time/ctime_r.c
b/src/time/ctime_r.c
index
d2260a1
..
3e24aa6
100644
(file)
--- a/
src/time/ctime_r.c
+++ b/
src/time/ctime_r.c
@@
-2,7
+2,6
@@
char *ctime_r(const time_t *t, char *buf)
{
- struct tm tm;
- localtime_r(t, &tm);
- return asctime_r(&tm, buf);
+ struct tm tm, *tm_p = localtime_r(t, &tm);
+ return tm_p ? asctime_r(tm_p, buf) : 0;
}