diff options
Diffstat (limited to 'time/strftime.c')
-rw-r--r-- | time/strftime.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/time/strftime.c b/time/strftime.c index 36088d04c9..4014826b50 100644 --- a/time/strftime.c +++ b/time/strftime.c @@ -658,8 +658,11 @@ strftime (s, maxsize, format, tp) case 's': /* GNU extension. */ { - struct tm ltm = *tp; - time_t t = mktime (<m); + struct tm ltm; + time_t t; + + ltm = *tp; + t = mktime (<m); /* Generate string value for T using time_t arithmetic; this works even if sizeof (long) < sizeof (time_t). */ @@ -818,8 +821,11 @@ strftime (s, maxsize, format, tp) diff = tp->tm_gmtoff; #else struct tm gtm; - struct tm ltm = *tp; - time_t lt = mktime (<m); + struct tm ltm; + time_t lt; + + ltm = *tp; + lt = mktime (<m); if (lt == (time_t) -1) { |