From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: [PATCH] examples/l2fwd-crypto: fix uninitialized errno value Date: Wed, 23 Aug 2017 17:54:03 +0530 Message-ID: <1503491044-27863-1-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , To: Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0050.outbound.protection.outlook.com [104.47.33.50]) by dpdk.org (Postfix) with ESMTP id 761EB7D42 for ; Wed, 23 Aug 2017 14:24:24 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" errno should be initialized to 0 before calling strtol Fixes: 1df9c0109f4c ("examples/l2fwd-crypto: parse key parameters") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- examples/l2fwd-crypto/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index f020be3..17673a3 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -1088,6 +1088,7 @@ parse_key(uint8_t *data, char *input_arg) unsigned byte_count; char *token; + errno = 0; for (byte_count = 0, token = strtok(input_arg, ":"); (byte_count < MAX_KEY_SIZE) && (token != NULL); token = strtok(NULL, ":")) { -- 2.7.4