null: fix build with gcc 5.1
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 29 May 2015 14:34:16 +0000 (15:34 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 2 Jun 2015 16:24:28 +0000 (18:24 +0200)
commitb34141b284f07eff7e04ed7dd0302b2e4dc3c7d9
tree26559923285791cb822322b6c149a2a2990140cb
parent36501efdfc3151567bedc408a05e4bb818082400
null: fix build with gcc 5.1

On Fedora 22, with GCC 5.1, errors are reported due to array accesses
being potentially out of bounds. This commit fixes this by adding in an
extra bounds check to the loop counters, or, in the case of stats reset,
by blindly zeroing the whole array, rather than just the part that is in
use.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
drivers/net/null/rte_eth_null.c