Coverity complains about out of bound access, which is a false positive.
The return value of the 'parse_port_list()' can't be bigger than
'maxsize' because of the logic in the function. ('value >= (int)maxsize'
check and 'marked[]' usage.)
But this is not explicitly clear, causing coverity warning and same
question can be rise by reviews later.
Adding a redundant check to highlight the access is in range, this is
done by replacing existing redundant check.
This is also good to protect against out out bound access in case
'parse_port_list()' behaviour changes later unexpectedly.
Coverity issue: 354229
Fixes: 2df00d562d ("app/testpmd: add --portlist option")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>