about summary refs log tree commit diff
path: root/Src/Zle/compcore.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-02 12:02:00 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-02 12:02:00 +0000
commita767556e6370f582729c850ecc18506efdff9e1a (patch)
tree846c74274d698ee8afc7ff339e6f192dea38135b /Src/Zle/compcore.c
parenteaa5228eb1bb5a8071cd9e2538b25588b081a1eb (diff)
downloadzsh-a767556e6370f582729c850ecc18506efdff9e1a.tar.gz
zsh-a767556e6370f582729c850ecc18506efdff9e1a.tar.xz
zsh-a767556e6370f582729c850ecc18506efdff9e1a.zip
zsh-workers/8481
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r--Src/Zle/compcore.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index ea9ff5b20..353084fd6 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -800,15 +800,14 @@ makecomplist(char *s, int incmd, int lst)
 	int n;
 
 	for (n = 0; m; m = m->next, n++) {
-	    if (m->matcher) {
-		*mp = (Cmlist) zhalloc(sizeof(struct cmlist));
-		(*mp)->matcher = m->matcher;
-		(*mp)->next = NULL;
-		(*mp)->str = dupstring(m->str);
-		mp = &((*mp)->next);
-		addlinknode(matchers, m->matcher);
+	    *mp = (Cmlist) zhalloc(sizeof(struct cmlist));
+	    (*mp)->matcher = m->matcher;
+	    (*mp)->next = NULL;
+	    (*mp)->str = dupstring(m->str);
+	    mp = &((*mp)->next);
+	    addlinknode(matchers, m->matcher);
+	    if (m->matcher)
 		m->matcher->refc++;
-	    }
 	}
 	m = mm;
 	compmatcher = 1;