about summary refs log tree commit diff
path: root/Src/Zle/compcore.c
diff options
context:
space:
mode:
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;