examples/ioat: fix failure check for ioat dequeue
authorCiara Power <ciara.power@intel.com>
Tue, 4 Feb 2020 16:00:06 +0000 (16:00 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 13 Feb 2020 13:43:56 +0000 (14:43 +0100)
commit579fb0b2c33a0946f37d120c4e3837a0a3817a7d
tree15b31c3bfaa54a392b39d270dc873921bd85408b
parent4c2af82e542c51175781aebf8f1a9ccfef823a11
examples/ioat: fix failure check for ioat dequeue

The nb_dq return value from the ioat dequeue is negative in failure
cases, however the variable was an unsigned int, causing the condition
where nb_dq <= 0 to never be true. This is now cast to a signed int,
which will successfully reflect the -1 value to be used in this
conditional check.

Coverity issue: 350342
Coverity issue: 350349
Fixes: 92c981637ffc ("examples/ioat: handle failure case for ioat dequeue")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
examples/ioat/ioatfwd.c