From: Ben Pfaff Date: Sun, 13 May 2012 23:33:49 +0000 (-0700) Subject: Avoid assigning the same value to a variable back-to-back. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7127d44be0b18808b89717cbcb5be3afca92c11;p=openvswitch Avoid assigning the same value to a variable back-to-back. Found by clang. Signed-off-by: Ben Pfaff --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 735a73c4..be1a45cb 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -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]; diff --git a/tests/test-util.c b/tests/test-util.c index c8026c13..097b1eb4 100644 --- a/tests/test-util.c +++ b/tests/test-util.c @@ -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;