>From 9151d81b576f0b7d560f828b1a28f02326ccec51 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 14 Sep 2016 03:38:34 +0000 Subject: [PATCH 06/10] internals: match_str: Downscope local variable 'bpc'. --- Src/Zle/compmatch.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index c51d849..f436a49 100644 --- a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -501,7 +501,7 @@ 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 il = 0, iw = 0, t, he = 0, bpc, bslash; + int il = 0, iw = 0, t, he = 0, bslash; char *ow; Cmlist ms; /* loop variable */ Cmatcher mp, lm = NULL; @@ -820,12 +820,14 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp, bc += llen; exact = 0; - if (!test) + if (!test) { + int bpc; while (bp && bc >= (bpc = (useqbr ? bp->qpos : bp->pos))) { bp->curpos = matchbufadded + bpc - bc + obc; bp = bp->next; } + } ow = w; if (!llen && !alen) { @@ -943,12 +945,14 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp, bc += mp->llen; exact = 0; - if (!test) + if (!test) { + int bpc; while (bp && bc >= (bpc = (useqbr ? bp->qpos : bp->pos))) { bp->curpos = matchbufadded + bpc - bc + obc; bp = bp->next; } + } ow = w; lm = NULL; he = 0;