about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/strftime.c14
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 (&ltm);
+	    struct tm ltm;
+	    time_t t;
+
+	    ltm = *tp;
+	    t = mktime (&ltm);
 
 	    /* 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 (&ltm);
+	    struct tm ltm;
+	    time_t lt;
+
+	    ltm = *tp;
+	    lt = mktime (&ltm);
 
 	    if (lt == (time_t) -1)
 	      {