From: Hemant Agrawal Date: Wed, 23 Aug 2017 12:24:03 +0000 (+0530) Subject: examples/l2fwd-crypto: fix uninitialized errno value X-Git-Tag: spdx-start~1445 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=455446276493a68117f738b2b778f2791751a2a7 examples/l2fwd-crypto: fix uninitialized errno value 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 Acked-by: Pablo de Lara Reviewed-by: Kirill Rybalchenko --- diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index f020be32d8..17673a3521 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, ":")) {