summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-01-21 10:42:02 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-01-21 10:42:02 +0100
commit831ea78623556cbfae002477afc6256cacaaf2c6 (patch)
tree41a2232265807c90c505772f7ef85d1825fc6f16 /libc/misc
parent0d30e6a7666c3cab001e7343a71bfa2d3e5abbd4 (diff)
wordexp: silence shadow warning
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/misc')
-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 '\\':