about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/linklist.c2
-rw-r--r--Src/zsh.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/Src/linklist.c b/Src/linklist.c
index 9062d3cd8..26b2c5e0e 100644
--- a/Src/linklist.c
+++ b/Src/linklist.c
@@ -41,6 +41,7 @@ newlinklist(void)
     list = (LinkList) zhalloc(sizeof *list);
     list->list.first = NULL;
     list->list.last = &list->node;
+    list->list.flags = 0;
     return list;
 }
 
@@ -53,6 +54,7 @@ znewlinklist(void)
     list = (LinkList) zalloc(sizeof *list);
     list->list.first = NULL;
     list->list.last = &list->node;
+    list->list.flags = 0;
     return list;
 }
 
diff --git a/Src/zsh.h b/Src/zsh.h
index d1ea5b359..e1e53f6b3 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -415,12 +415,14 @@ union linkroot {
     do { \
         (N).list.first = NULL; \
         (N).list.last = &(N).node; \
+        (N).list.flags = 0; \
     } while (0)
 #define local_list1(N) union linkroot N; struct linknode __n0
 #define init_list1(N,V0) \
     do { \
         (N).list.first = &__n0; \
         (N).list.last = &__n0; \
+        (N).list.flags = 0; \
         __n0.next = NULL; \
         __n0.prev = &(N).node; \
         __n0.dat = (void *) (V0); \