From d7127d44be0b18808b89717cbcb5be3afca92c11 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 13 May 2012 16:33:49 -0700 Subject: [PATCH] Avoid assigning the same value to a variable back-to-back. Found by clang. Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif.c | 1 - tests/test-util.c | 1 - 2 files changed, 2 deletions(-) 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; -- 2.30.2