[dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing

Fan Zhang roy.fan.zhang at intel.com
Mon Apr 9 19:57:40 CEST 2018


Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application")

This patch fixes the parsing of cryptodev id in the cmdline.

Signed-off-by: Fan Zhang <roy.fan.zhang at intel.com>
---
 examples/vhost_crypto/main.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index bc867240d..860200e29 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg)
 
 	/* parse decimal string */
 	pm = strtoul(q_arg, &end, 10);
-	if ((pm == '\0') || (end == NULL) || (*end != '\0')) {
-		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
-		return -1;
-	}
-
 	if (pm > rte_cryptodev_count()) {
 		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
 		return -1;
-- 
2.13.6



More information about the dev mailing list