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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/time/tzset.c b/time/tzset.c
index 4b8fa41021..9c8e5d7b9c 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -115,7 +115,7 @@ char *
 __tzstring (string)
      const char *string;
 {
-  struct tzstring_head *h = &tzstring_list.head;
+  struct tzstring_head *h;
   size_t needed;
   char *p;
 
@@ -139,7 +139,8 @@ __tzstring (string)
       size_t buffer_size = tzstring_last_buffer_size;
       while ((buffer_size *= 2) < needed)
 	continue;
-      if (! (h = h->next = malloc (sizeof *h + buffer_size)))
+      h = malloc (sizeof *h + buffer_size);
+      if (h == NULL)
 	return NULL;
       h->next = NULL;
       tzstring_last_buffer_size = buffer_size;