>From 7db7a9a55f3897e34300ef7462c45fda4a7fbc91 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 14 Sep 2016 03:38:35 +0000 Subject: [PATCH 07/10] internals: match_str: Rename and constify local variables 'oll', 'olw'. --- Src/Zle/compmatch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index f436a49..673347e 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