]> 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 20:02:48 +0000 (16:02 -0400)
- Minor refactoring

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

index 11c9a0968bcf9ca3181440f185c861f02427edb7..03092ed1844748438c74dd5972d400d6376e2b64 100644 (file)
@@ -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);
     }
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);
     }