DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix wrong return value in parse_port_list
@ 2020-02-20 13:26 Hariprasad Govindharajan
  2020-02-20 15:29 ` Iremonger, Bernard
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hariprasad Govindharajan @ 2020-02-20 13:26 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, ferruh.yigit, stephen, david.marchand, Hariprasad Govindharajan

The function parse_port_list() is designed to return
unsigned int value. After sanitizing the inputs,
it is returning -1. Changed it to return 0.

Fixes: 2df00d562d20 ("app/testpmd: add --portlist option")
Cc: hariprasad.govindharajan@intel.com

Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
---
 app/test-pmd/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 9d95202..91db508 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2642,7 +2642,7 @@ parse_port_list(const char *list, unsigned int *values, unsigned int maxsize)
 	unsigned int marked[maxsize];
 
 	if (list == NULL || values == NULL)
-		return -1;
+		return 0;
 
 	for (i = 0; i < (int)maxsize; i++)
 		marked[i] = 0;
-- 
2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-20 20:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 13:26 [dpdk-dev] [PATCH] app/testpmd: fix wrong return value in parse_port_list Hariprasad Govindharajan
2020-02-20 15:29 ` Iremonger, Bernard
2020-02-20 15:43 ` [dpdk-dev] [PATCH v2] app/testpmd: fix return value in portlist parser Hariprasad Govindharajan
2020-02-20 15:46   ` Govindharajan, Hariprasad
2020-02-20 17:01   ` Ferruh Yigit
2020-02-20 17:39 ` [dpdk-dev] [PATCH v3] " Hariprasad Govindharajan
2020-02-20 20:41   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).