From: Vipin Varghese Date: Tue, 27 Feb 2018 21:10:22 +0000 (+0530) Subject: event/sw: simplify counter assignment X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e4dff5503a80e60e1e1a4b115b258aeaf791b01c;p=dpdk.git event/sw: simplify counter assignment Counter variable 'out_pkts' had been set to 0, then updated. Current code change elimates double assignment to direct assignment. Signed-off-by: Vipin Varghese Acked-by: Kevin Laatz --- diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c index 9143b934f8..e3a41e02f4 100644 --- a/drivers/event/sw/sw_evdev_scheduler.c +++ b/drivers/event/sw/sw_evdev_scheduler.c @@ -532,8 +532,7 @@ sw_event_schedule(struct rte_eventdev *dev) } while (in_pkts > 4 && (int)in_pkts_this_iteration < sched_quanta); - out_pkts = 0; - out_pkts += sw_schedule_qid_to_cq(sw); + out_pkts = sw_schedule_qid_to_cq(sw); out_pkts_total += out_pkts; in_pkts_total += in_pkts_this_iteration;