diff options
| author | F. Aragon <paco@voltanet.io> | 2018-09-12 12:25:27 +0200 |
|---|---|---|
| committer | F. Aragon <paco@voltanet.io> | 2018-09-12 12:27:38 +0200 |
| commit | c683bd446c59dc09d4b19eb47718b014c433d900 (patch) | |
| tree | d5f3da3a4390fbbc45ac9f9e170fed0ba2d170b7 /lib/command_match.c | |
| parent | 88f47ef36536a040b30652bc22c253e7c5bc1c2e (diff) | |
lib vtysh zebra: variable shadowing fixes
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'lib/command_match.c')
| -rw-r--r-- | lib/command_match.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/command_match.c b/lib/command_match.c index c165305d78..a1ae3ac6b9 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -195,7 +195,7 @@ static enum matcher_rv command_match_r(struct graph_node *start, vector vline, enum matcher_rv status = MATCHER_NO_MATCH; // get the minimum match level that can count as a full match - struct cmd_token *token = start->data; + struct cmd_token *copy, *token = start->data; enum match_type minmatch = min_match_level(token->type); /* check history/stack of tokens @@ -326,8 +326,8 @@ static enum matcher_rv command_match_r(struct graph_node *start, vector vline, } if (*currbest) { // copy token, set arg and prepend to currbest - struct cmd_token *token = start->data; - struct cmd_token *copy = cmd_token_dup(token); + token = start->data; + copy = cmd_token_dup(token); copy->arg = XSTRDUP(MTYPE_CMD_ARG, input_token); listnode_add_before(*currbest, (*currbest)->head, copy); } else if (n + 1 == vector_active(vline) && status == MATCHER_NO_MATCH) |
