From 3afc2528d1b09895c4e56b7d81c20298455ab7fa Mon Sep 17 00:00:00 2001 From: zerico <71151164+ZERICO2005@users.noreply.github.com> Date: Fri, 13 Mar 2026 17:13:41 -0600 Subject: [PATCH] use boot_sprintf in asctime --- src/libc/asctime.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libc/asctime.c b/src/libc/asctime.c index a0fe40b2b..268978fe6 100644 --- a/src/libc/asctime.c +++ b/src/libc/asctime.c @@ -1,5 +1,6 @@ #include #include +#include char *asctime(const struct tm *timeptr) { @@ -21,19 +22,20 @@ char *asctime(const struct tm *timeptr) timeptr->tm_hour < 0 || timeptr->tm_hour > 23 || timeptr->tm_min < 0 || timeptr->tm_min > 59 || timeptr->tm_sec < 0 || timeptr->tm_sec > 60 || - timeptr->tm_year < -1900 || timeptr->tm_year > 8099) - { + timeptr->tm_year < -1900 || timeptr->tm_year > 8099 + ) { return NULL; } - sprintf(result, "%.3s %.3s %2d %.2d:%.2d:%.2d %d\n", + boot_sprintf(result, "%.3s %.3s %2d %.2d:%.2d:%.2d %d\n", wday_name[timeptr->tm_wday], mon_name[timeptr->tm_mon], timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, timeptr->tm_sec, - 1900 + timeptr->tm_year); + 1900 + timeptr->tm_year + ); return result; }