Only the last feature was checked since commit
99f2cdf9ca10
(eal: fix %rbx corruption and simplify the code)
The return code for rte_cpu_get_flag_enabled is only checked on the termination
of the for loop that it is called inside, but should be checked for every
iteration it makes through the for loop. This is caused by some silly missing
brackets. Simply add them in
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Pablo De Lara Guarch <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
unsigned i;
int ret;
- for (i = 0; i < sizeof(compile_time_flags)/sizeof(compile_time_flags[0]); i++)
+ for (i = 0; i < sizeof(compile_time_flags)/sizeof(compile_time_flags[0]); i++) {
ret = rte_cpu_get_flag_enabled(compile_time_flags[i]);
if (ret < 0) {
cpu_feature_table[compile_time_flags[i]].name);
exit(1);
}
+ }
}