summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorHung-Weic Chiu <sppsorrg@gmail.com>2017-05-10 01:57:11 +0000
committerQuentin Young <qlyoung@users.noreply.github.com>2017-05-10 15:46:24 -0400
commitbb1e60c3a17d7a6168f450d909cf51918e85f7ee (patch)
treebe727f94b3feebefda704cc6eb17cd3ecad4385f /lib/command.c
parent2eb7728d0bc10bfee885d62e2eeb9368c5436214 (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.c5
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);
}