Avoid assigning the same value to a variable back-to-back.
authorBen Pfaff <blp@nicira.com>
Sun, 13 May 2012 23:33:49 +0000 (16:33 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 14 May 2012 16:37:18 +0000 (09:37 -0700)
Found by clang.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c
tests/test-util.c

index 735a73c400b1b7921541b6259e5eb6642f6fb076..be1a45cb9b29fb99b575e0bdf0d3d70b4bc6c063 100644 (file)
@@ -3156,7 +3156,6 @@ handle_upcalls(struct ofproto_dpif *ofproto, unsigned int max_batch)
 
     assert(max_batch <= FLOW_MISS_MAX_BATCH);
 
-    n_processed = 0;
     n_misses = 0;
     for (n_processed = 0; n_processed < max_batch; n_processed++) {
         struct dpif_upcall *upcall = &misses[n_misses];
index c8026c13bf1de44fa628cafb57018a968a23107b..097b1eb481f5e8c9f4995cf93f74a030bf8be202 100644 (file)
@@ -189,7 +189,6 @@ check_bitwise_is_all_zeros(void)
 {
     int n_loops;
 
-    n_loops = 0;
     for (n_loops = 0; n_loops < 100; n_loops++) {
         ovs_be64 x = htonll(0);
         int i;