Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: dead code in update_bmatchers



q is never non-NULL, and wouldn't even be used if it were.

Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.56
diff -u -r1.56 compmatch.c
--- Src/Zle/compmatch.c	10 Jun 2008 19:12:57 -0000	1.56
+++ Src/Zle/compmatch.c	4 Sep 2008 21:16:12 -0000
@@ -120,7 +120,7 @@
 mod_export void
 update_bmatchers(void)
 {
-    Cmlist p = bmatchers, q = NULL, ms;
+    Cmlist p = bmatchers, ms;
     Cmatcher mp;
     int t;
 
@@ -132,10 +132,7 @@
 
 	p = p->next;
 	if (!t) {
-	    if (q)
-		q->next = p;
-	    else
-		bmatchers = p;
+	    bmatchers = p;
 	}
     }
 }



Messages sorted by: Reverse Date, Date, Thread, Author