about summary refs log tree commit diff
path: root/time/tzset.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/tzset.c')
-rw-r--r--time/tzset.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/time/tzset.c b/time/tzset.c
index 13360b445b..8d8be34405 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -108,16 +108,12 @@ __tzset_internal (always)
 
   /* Free old storage.  */
   if (tz_rules[0].name != NULL && *tz_rules[0].name != '\0')
-    {
-      free((void *) tz_rules[0].name);
-      tz_rules[0].name = NULL;
-    }
+    free((void *) tz_rules[0].name);
   if (tz_rules[1].name != NULL && *tz_rules[1].name != '\0' &&
       tz_rules[1].name != tz_rules[0].name)
-    {
-      free((void *) tz_rules[1].name);
-      tz_rules[1].name = NULL;
-    }
+    free((void *) tz_rules[1].name);
+  tz_rules[0].name = NULL;
+  tz_rules[1].name = NULL;
 
   /* Save the value of `tz'.  */
   if (old_tz != NULL)
@@ -234,6 +230,9 @@ __tzset_internal (always)
 	  tz += l;
 	}
     }
+  else
+    /* There is no DST.  */
+    tz_rules[1].name = tz_rules[0].name;
 
   /* Figure out the DST offset from GMT.  */
   if (*tz == '-' || *tz == '+')