File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11#include <time.h>
22#include <stdio.h>
3+ #include <ti/sprintf.h>
34
45char * asctime (const struct tm * timeptr )
56{
@@ -21,19 +22,20 @@ char *asctime(const struct tm *timeptr)
2122 timeptr -> tm_hour < 0 || timeptr -> tm_hour > 23 ||
2223 timeptr -> tm_min < 0 || timeptr -> tm_min > 59 ||
2324 timeptr -> tm_sec < 0 || timeptr -> tm_sec > 60 ||
24- timeptr -> tm_year < -1900 || timeptr -> tm_year > 8099 )
25- {
25+ timeptr -> tm_year < -1900 || timeptr -> tm_year > 8099
26+ ) {
2627 return NULL ;
2728 }
2829
29- sprintf (result , "%.3s %.3s %2d %.2d:%.2d:%.2d %d\n" ,
30+ boot_sprintf (result , "%.3s %.3s %2d %.2d:%.2d:%.2d %d\n" ,
3031 wday_name [timeptr -> tm_wday ],
3132 mon_name [timeptr -> tm_mon ],
3233 timeptr -> tm_mday ,
3334 timeptr -> tm_hour ,
3435 timeptr -> tm_min ,
3536 timeptr -> tm_sec ,
36- 1900 + timeptr -> tm_year );
37+ 1900 + timeptr -> tm_year
38+ );
3739
3840 return result ;
3941}
You can’t perform that action at this time.
0 commit comments