zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: dead code in update_bmatchers
Date: Thu, 4 Sep 2008 21:17:22 +0000	[thread overview]
Message-ID: <20080904211722.GA31436@scru.org> (raw)

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;
 	}
     }
 }


                 reply	other threads:[~2008-09-05  0:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080904211722.GA31436@scru.org \
    --to=clint@zsh.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).