about summary refs log tree commit diff
path: root/Src/Zle/compmatch.c
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-14 03:38:35 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-16 03:53:04 +0000
commit31665068c12a0df574d490596f166886d6172405 (patch)
treeab55a22e14c54ea0f292384bc48729c44f22ddc2 /Src/Zle/compmatch.c
parent09a6e96cc02348c13d2f17dae571b818cccbb631 (diff)
downloadzsh-31665068c12a0df574d490596f166886d6172405.tar.gz
zsh-31665068c12a0df574d490596f166886d6172405.tar.xz
zsh-31665068c12a0df574d490596f166886d6172405.zip
39310/0007: internals: match_str: Rename and constify local variables 'oll', 'olw'.
Diffstat (limited to 'Src/Zle/compmatch.c')
-rw-r--r--Src/Zle/compmatch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index d007b14cc..f670de781 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -500,7 +500,7 @@ int
 match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp,
 	  const int sfx, int test, int part)
 {
-    int ll = strlen(l), lw = strlen(w), oll = ll, olw = lw, exact = 0, wexact = 0;
+    int ll = strlen(l), lw = strlen(w), exact = 0, wexact = 0;
     int il = 0, iw = 0, t, he = 0, bslash;
     char *ow;
     Cmlist ms; /* loop variable */
@@ -509,6 +509,7 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp,
     const int obc = bc;
     const int ind = (sfx ? -1 : 0);
     const int add = (sfx ? -1 : 1);
+    const int original_ll = ll, original_lw = lw;
 
     if (!test) {
 	start_match();
@@ -585,7 +586,7 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp,
 	    for (mp = ms->matcher; mp; mp = mp->next) {
 		t = 1;
 		if ((lm && lm == mp) ||
-		    ((oll == ll || olw == lw) &&
+		    ((original_ll == ll || original_lw == lw) &&
 		     (test == 1 || (test && !mp->left && !mp->right)) &&
 		     mp->wlen < 0))
 		    /* If we were called recursively, don't use `*' patterns