ring: reduce scope of local variables
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 29 Mar 2017 15:21:27 +0000 (16:21 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 29 Mar 2017 20:32:20 +0000 (22:32 +0200)
commit3fe963a85ae9c953b3cd905753d1f23af44cf30f
tree1ab76f553fa91bd3a19d9c74af53586e7476fc23
parenteb4562714f9fd9e284977207eb1a78066dc4b9f8
ring: reduce scope of local variables

The local variable i is only used for loop control so define it in
the enqueue and dequeue blocks directly, rather than at the function
level.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_ring/rte_ring.h