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 735a73c..be1a45c 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 c8026c1..097b1eb 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;