From f2e300431f5c56c0d2019a197ad1da24592ea842 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 21 Jan 2010 10:42:02 +0100 Subject: wordexp: silence shadow warning Signed-off-by: Bernhard Reutner-Fischer (cherry picked from commit 831ea78623556cbfae002477afc6256cacaaf2c6) Signed-off-by: Carmelo Amoroso --- libc/misc/wordexp/wordexp.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/wordexp/wordexp.c b/libc/misc/wordexp/wordexp.c index 1737ccc48..2f529158c 100644 --- a/libc/misc/wordexp/wordexp.c +++ b/libc/misc/wordexp/wordexp.c @@ -1444,28 +1444,28 @@ parse_param(char **word, size_t * word_length, size_t * max_length, size_t exp_len; size_t exp_maxl; char *p; - int quoted = 0; /* 1: single quotes; 2: double */ + int quotes = 0; /* 1: single quotes; 2: double */ expanded = w_newword(&exp_len, &exp_maxl); for (p = pattern; p && *p; p++) { - size_t offset; + size_t _offset; switch (*p) { case '"': - if (quoted == 2) - quoted = 0; - else if (quoted == 0) - quoted = 2; + if (quotes == 2) + quotes = 0; + else if (quotes == 0) + quotes = 2; else break; continue; case '\'': - if (quoted == 1) - quoted = 0; - else if (quoted == 0) - quoted = 1; + if (quotes == 1) + quotes = 0; + else if (quotes == 0) + quotes = 1; else break; @@ -1473,7 +1473,7 @@ parse_param(char **word, size_t * word_length, size_t * max_length, case '*': case '?': - if (quoted) { + if (quotes) { /* Convert quoted wildchar to escaped wildchar. */ expanded = w_addchar(expanded, &exp_len, &exp_maxl, '\\'); @@ -1484,9 +1484,9 @@ parse_param(char **word, size_t * word_length, size_t * max_length, break; case '$': - offset = 0; + _offset = 0; error = parse_dollars(&expanded, &exp_len, &exp_maxl, p, - &offset, flags, NULL, NULL, NULL, 1); + &_offset, flags, NULL, NULL, NULL, 1); if (error) { if (free_value) free(value); @@ -1496,16 +1496,16 @@ parse_param(char **word, size_t * word_length, size_t * max_length, goto do_error; } - p += offset; + p += _offset; continue; case '~': - if (quoted || exp_len) + if (quotes || exp_len) break; - offset = 0; + _offset = 0; error = parse_tilde(&expanded, &exp_len, &exp_maxl, p, - &offset, 0); + &_offset, 0); if (error) { if (free_value) free(value); @@ -1515,7 +1515,7 @@ parse_param(char **word, size_t * word_length, size_t * max_length, goto do_error; } - p += offset; + p += _offset; continue; case '\\': -- cgit v1.2.3