Unified · Split
| @@ -33,7 +33,9 @@ fmttime(long long v) · 32 unmodified lines | |||
| 33 | static char buf[32]; | 33 | static char buf[32]; |
| 34 | time_t t = v; | 34 | time_t t = v; |
| 35 | struct tm *tm; | 35 | struct tm *tm; |
| 36 | tm = gmtime(&t); | 36 | |
| 37 | strftime(buf, sizeof(buf), "%c", tm); | 37 | buf[0] = 0; |
| 38 | if((tm = gmtime(&t)) != nil) | ||
| 39 | strftime(buf, sizeof(buf), "%c", tm); | ||
| 38 | return buf; | 40 | return buf; |
| 39 | } | 41 | } |