diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-09-06 13:51:10 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-09-12 14:34:28 -0400 |
commit | b5dbf4d424efdbe54daa939aae80d69c4244c023 (patch) | |
tree | f023d22580b1e074aa926dfaca38fa69fbd44cfa /src/time/asctime.c | |
parent | cb229f614f937515b78e40701f36c26c7def01b7 (diff) | |
download | musl-b5dbf4d424efdbe54daa939aae80d69c4244c023.tar.gz musl-b5dbf4d424efdbe54daa939aae80d69c4244c023.tar.xz musl-b5dbf4d424efdbe54daa939aae80d69c4244c023.zip |
use idiomatic weak alias approach for defining asctime_r
get rid of a gratuitous translation unit and call frame between asctime_r and the actual implementation of the function. this is the way gmtime_r and localtime_r are already done.
Diffstat (limited to 'src/time/asctime.c')
-rw-r--r-- | src/time/asctime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time/asctime.c b/src/time/asctime.c index 3102eb87..57d15fe0 100644 --- a/src/time/asctime.c +++ b/src/time/asctime.c @@ -1,9 +1,9 @@ #include <time.h> -char *__asctime(const struct tm *, char *); +char *__asctime_r(const struct tm *, char *); char *asctime(const struct tm *tm) { static char buf[26]; - return __asctime(tm, buf); + return __asctime_r(tm, buf); } |