about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-09-10 18:33:32 +0000
committerClint Adams <clint@users.sourceforge.net>2008-09-10 18:33:32 +0000
commit96fc1bb1495bb1b417391f54b725f7cd3d5dcc2f (patch)
treeef8b96b7864ffe4f097a2060620f0139a86982a8
parentc543084471bf8f267c1ebf22c15e2e87a9a5d25d (diff)
downloadzsh-96fc1bb1495bb1b417391f54b725f7cd3d5dcc2f.tar.gz
zsh-96fc1bb1495bb1b417391f54b725f7cd3d5dcc2f.tar.xz
zsh-96fc1bb1495bb1b417391f54b725f7cd3d5dcc2f.zip
25638: remove unnecessary ternary expression in match_str.
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/compmatch.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 976013bda..c7749ba10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-09-10  Clint Adams  <clint@zsh.org>
 
+	* 25638: Src/Zle/compmatch.c: remove unnecessary ternary expression
+	in match_str.
+
 	* 25637: Src/exec.c: dereference prog after the NULL check.
 
 2008-09-08  Clint Adams  <clint@zsh.org>
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index 9bef1cfeb..836dcdd45 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -562,7 +562,7 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp,
 	    wexact += 1 + bslash;
 	    if (!test)
 		while (bp && bc >= (useqbr ? bp->qpos : bp->pos)) {
-		    bp->curpos = matchbufadded + (sfx ? (ow - w) : (w - ow)) + obc;
+		    bp->curpos = matchbufadded + (w - ow) + obc;
 		    bp = bp->next;
 		}
 	    lm = NULL;