examples/exception_path: fix shift operation in lcore setup

CID: #30688
The operaton may have an undefined behavior or yield to an unexpected result.

In setup_port_lcore_affinities: A bit shift operation has a shift amount
which is too large or has a negative value.

Fixes: af75078fec ("first public release")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
This commit is contained in:
Daniel Mrzyglod 2016-04-15 17:29:40 +02:00 committed by Thomas Monjalon
parent 1ef6012ec1
commit ea977ff1cb

View File

@ -350,8 +350,7 @@ setup_port_lcore_affinities(void)
}
port_ids[i] = rx_port++;
}
else if (output_cores_mask & (1ULL << i)) {
} else if (output_cores_mask & (1ULL << (i & 0x3f))) {
/* Skip ports that are not enabled */
while ((ports_mask & (1 << tx_port)) == 0) {
tx_port++;