app/testpmd: fix stats error message
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Sat, 6 Jun 2020 03:46:37 +0000 (11:46 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 8 Jun 2020 14:46:10 +0000 (16:46 +0200)
commit5fd722308ef21819931d25e7a140ff5a292b19d9
tree2cc3505a877197c6940fb02249af58299c523734
parente4b72060c71222d9536c634336f96f9c30c6cf82
app/testpmd: fix stats error message

There are coverity defects related "Argument cannot be negative"

This patch fixes them by passing '-ret' to the function strerror() when
ret is negative.

Coverity issue: 349913, 358437, 358449, 358450
Fixes: da328f7f115a ("ethdev: change xstats reset function to return int")
Fixes: 9eb974221f44 ("app/testpmd: fix statistics after reset")
Cc: stable@dpdk.org
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/config.c