Fix coverity error in IP4 Mtrie. 27/7027/2
authorNeale Ranns <nranns@cisco.com>
Tue, 6 Jun 2017 13:52:14 +0000 (06:52 -0700)
committerChris Luke <chris_luke@comcast.com>
Tue, 6 Jun 2017 17:03:54 +0000 (17:03 +0000)
Change-Id: I586a758a8b4b0ea5ca030b2df2796f5acb49e154
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/vnet/ip/ip4_mtrie.c

index e1987d5..cc82384 100644 (file)
@@ -284,8 +284,8 @@ set_leaf (ip4_fib_mtrie_t * m,
   if (n_dst_bits_next_plies <= 0)
     {
       /* The mask length of the address to insert maps to this ply */
-      uword i, old_leaf_is_terminal;
-      u32 n_dst_bits_this_ply;
+      uword old_leaf_is_terminal;
+      u32 i, n_dst_bits_this_ply;
 
       /* The number of bits, and hence slots/buckets, we will fill */
       n_dst_bits_this_ply = clib_min (8, -n_dst_bits_next_plies);
@@ -413,8 +413,8 @@ set_root_leaf (ip4_fib_mtrie_t * m,
   if (n_dst_bits_next_plies <= 0)
     {
       /* The mask length of the address to insert maps to this ply */
-      uword i, old_leaf_is_terminal;
-      u32 n_dst_bits_this_ply;
+      uword old_leaf_is_terminal;
+      u32 i, n_dst_bits_this_ply;
 
       /* The number of bits, and hence slots/buckets, we will fill */
       n_dst_bits_this_ply = 16 - a->dst_address_length;