about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2006-03-07 22:05:44 +0000
committerWayne Davison <wayned@users.sourceforge.net>2006-03-07 22:05:44 +0000
commit5fd72f0f1a2f1534bfa7ee7a13b82970d6e8227c (patch)
tree22516dd6c0fc6c5c15b765fad878d7f44cf582d5
parent974fd9b633ab6c210698209a31db801ce40482bd (diff)
downloadzsh-5fd72f0f1a2f1534bfa7ee7a13b82970d6e8227c.tar.gz
zsh-5fd72f0f1a2f1534bfa7ee7a13b82970d6e8227c.tar.xz
zsh-5fd72f0f1a2f1534bfa7ee7a13b82970d6e8227c.zip
Initialize the new "flags" integer when creating a list.
-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); \