]> git.puffer.fish Git - mirror/frr.git/commitdiff
- Solve the Coverity Scan PW.ASSIGN_WHERE_COMPARE_MEANT
authorHung-Weic Chiu <sppsorrg@gmail.com>
Wed, 10 May 2017 01:57:11 +0000 (01:57 +0000)
committerQuentin Young <qlyoung@users.noreply.github.com>
Wed, 10 May 2017 19:46:24 +0000 (15:46 -0400)
- Minor refactoring

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
lib/command.c
tools/permutations.c

index 43b2c478a03fafe6487c630708a4ece0ea0cb043..ff921ff40252b793963958e67b1aa0123fb72983 100644 (file)
@@ -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);
     }
index 6e1a37981a7b4044b3bd639346609313b49c0e04..88d1464697c7d0e36b8aa7d7faf49ead6e6f3ca8 100644 (file)
@@ -87,8 +87,11 @@ permute (struct graph_node *start)
       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);
     }