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 16:02:48 -0400
commit9bc221113cf05f6cce9db83b6b4ff30ad8a8685b (patch)
tree5a8d26f955c8d036d55738a4a42a1cdaf5c5822b /lib/command.c
parent00a1578051ceeb26b0b9c2c3344cac1f202e047d (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 11c9a0968b..03092ed184 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1623,8 +1623,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);
}