mem: fix build with gcc 5.1
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 29 May 2015 14:34:13 +0000 (15:34 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 2 Jun 2015 16:24:28 +0000 (18:24 +0200)
commit0ff9695e37f4d458ef308a6ad598a0fe4444d722
tree21c21c57be8f72dbd6faf678c16e2e04470b1d71
parent1a1109404e702d3ad1ccc1033df55c59bec1f89a
mem: 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 ensuring the
bounds check in the loop takes account of the array size.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
lib/librte_eal/linuxapp/eal/eal_memory.c