zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: remove dead code in execbuiltin
@ 2008-10-14 21:44 Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2008-10-14 21:44 UTC (permalink / raw)
  To: zsh-workers

This occurs within a while loop inside an if(optstr), and within
the loop, the only modification to optstr is potentially to set it to
"ne", in which case it is still set, so therefore the "else p++"
cannot happen.

Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.211
diff -u -r1.211 builtin.c
--- Src/builtin.c	6 Oct 2008 18:15:36 -0000	1.211
+++ Src/builtin.c	14 Oct 2008 21:42:51 -0000
@@ -313,10 +313,7 @@
 		*/
 		if (flags & BINF_SKIPINVALID) {
 		    char *p = arg;
-		    if (optstr)
-			while (*++p && strchr(optstr, (int) *p));
-		    else
-			p++;
+		    while (*++p && strchr(optstr, (int) *p));
 		    if (*p)
 			break;
 		}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-14 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-14 21:44 PATCH: remove dead code in execbuiltin Clint Adams

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).