app/procinfo: fix check on xstats-ids
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 19 Nov 2020 11:58:52 +0000 (11:58 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 11 Jan 2021 09:45:34 +0000 (10:45 +0100)
commit59b981c6f69cb1c705bfb93890ce8cc2a8bcdfb5
tree5e27a72258035ea0dcd031d3931c0eff25e0d19e
parentf7605e24baba5c614352ed3db0bf48d7f06e59b0
app/procinfo: fix check on xstats-ids

'parse_xstats_ids()' return 'int'. The return value is assigned to
'nb_xstats_ids' unsigned value, later negative check on this variable is
wrong.

Adding interim 'int' variable for negative check.

Fixes: 7ac16a3660c0 ("app/proc-info: support xstats by ID and by name")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
app/proc-info/main.c