diff options
author | Roland McGrath <roland@hack.frob.com> | 2014-10-13 11:12:28 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2014-10-13 11:12:28 -0700 |
commit | 53544380266a8eb38bef9389562fba3ed58a0d11 (patch) | |
tree | d040f7c483990e8cf4bb8e11102f15c04a2f6514 /posix | |
parent | fcb32af153a745414b0d949e707c9485ab77d6ba (diff) | |
download | glibc-roland/Wshadow.zip glibc-roland/Wshadow.tar.gz glibc-roland/Wshadow.tar.bz2 |
Diffstat (limited to 'posix')
-rw-r--r-- | posix/regcomp.c | 10 | ||||
-rw-r--r-- | posix/wordexp.c | 25 |
2 files changed, 17 insertions, 18 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c index 897fe27..695b082 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -1036,11 +1036,11 @@ create_initial_state (re_dfa_t *dfa) int dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { - reg_errcode_t err = re_node_set_merge (&init_nodes, - dfa->eclosures - + dest_idx); - if (err != REG_NOERROR) - return err; + reg_errcode_t merge_err = re_node_set_merge (&init_nodes, + dfa->eclosures + + dest_idx); + if (merge_err != REG_NOERROR) + return merge_err; i = 0; } } diff --git a/posix/wordexp.c b/posix/wordexp.c index b6b65dd..7daa918 100644 --- a/posix/wordexp.c +++ b/posix/wordexp.c @@ -1218,7 +1218,7 @@ static int internal_function parse_param (char **word, size_t *word_length, size_t *max_length, const char *words, size_t *offset, int flags, wordexp_t *pwordexp, - const char *ifs, const char *ifs_white, int quoted) + const char *ifs, const char *ifs_white, int param_quoted) { /* We are poised just after "$" */ enum action @@ -1474,7 +1474,7 @@ envsubst: return *word ? 0 : WRDE_NOSPACE; } /* Is it `$*' or `$@' (unquoted) ? */ - else if (*env == '*' || (*env == '@' && !quoted)) + else if (*env == '*' || (*env == '@' && !param_quoted)) { size_t plist_len = 0; int p; @@ -1500,7 +1500,7 @@ envsubst: else { /* Must be a quoted `$@' */ - assert (*env == '@' && quoted); + assert (*env == '@' && param_quoted); /* Each parameter is a separate word ("$@") */ if (__libc_argc == 2) @@ -1599,8 +1599,6 @@ envsubst: expanded = w_newword (&exp_len, &exp_maxl); for (p = pattern; p && *p; p++) { - size_t offset; - switch (*p) { case '"': @@ -1634,10 +1632,11 @@ envsubst: } break; - case '$': - offset = 0; + case '$':; + size_t dollars_offset = 0; error = parse_dollars (&expanded, &exp_len, &exp_maxl, p, - &offset, flags, NULL, NULL, NULL, 1); + &dollars_offset, flags, + NULL, NULL, NULL, 1); if (error) { if (free_value) @@ -1648,16 +1647,16 @@ envsubst: goto do_error; } - p += offset; + p += dollars_offset; continue; case '~': if (quoted || exp_len) break; - offset = 0; + size_t tilde_offset = 0; error = parse_tilde (&expanded, &exp_len, &exp_maxl, p, - &offset, 0); + &tilde_offset, 0); if (error) { if (free_value) @@ -1668,7 +1667,7 @@ envsubst: goto do_error; } - p += offset; + p += tilde_offset; continue; case '\\': @@ -1940,7 +1939,7 @@ envsubst: if (value == NULL) return 0; - if (quoted || !pwordexp) + if (param_quoted || !pwordexp) { /* Quoted - no field split */ *word = w_addstr (*word, word_length, max_length, value); |