From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fan Zhang Subject: [PATCH] examples/vhost_crypto: fix parsing Date: Mon, 9 Apr 2018 18:57:40 +0100 Message-ID: <20180409175740.86858-1-roy.fan.zhang@intel.com> References: <20180409163832.85611-1-roy.fan.zhang@intel.com> Cc: roy.fan.zhang@intel.com, maxime.coquelin@redhat.com, ferruh.yigit@intel.com To: dev@dpdk.org Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id DDCF81B825 for ; Mon, 9 Apr 2018 20:05:21 +0200 (CEST) In-Reply-To: <20180409163832.85611-1-roy.fan.zhang@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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