diff options
| author | Hung-Weic Chiu <sppsorrg@gmail.com> | 2017-05-10 01:57:11 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@users.noreply.github.com> | 2017-05-10 15:46:24 -0400 | 
| commit | bb1e60c3a17d7a6168f450d909cf51918e85f7ee (patch) | |
| tree | be727f94b3feebefda704cc6eb17cd3ecad4385f /lib/command.c | |
| parent | 2eb7728d0bc10bfee885d62e2eeb9368c5436214 (diff) | |
- Solve the Coverity Scan PW.ASSIGN_WHERE_COMPARE_MEANT
- Minor refactoring
Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c index 43b2c478a0..ff921ff402 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1615,8 +1615,11 @@ permute (struct graph_node *start, struct vty *vty)        bool skip = false;        if (stok->type == FORK_TKN && tok->type != FORK_TKN)          for (ALL_LIST_ELEMENTS_RO (position, ln, gnn)) -           if (gnn == gn && (skip = true)) +           if (gnn == gn) +           { +             skip = true;               break; +           }        if (!skip)          permute (gn, vty);      }  | 
