summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-01-21 10:42:02 +0100
committerCarmelo Amoroso <carmelo.amoroso@st.com>2010-01-21 12:44:29 +0100
commitf2e300431f5c56c0d2019a197ad1da24592ea842 (patch)
tree6c29c74280e202ffba073770a9da0b96b231ca7b /libc
parent3e3e6542fefe03cadcdfc654a989c9c6a1010f32 (diff)
wordexp: silence shadow warning
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 831ea78623556cbfae002477afc6256cacaaf2c6) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/misc/wordexp/wordexp.c36
1 files changed, 18 insertions, 18 deletions
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 '\\':