summaryrefslogtreecommitdiff
path: root/examples/l2fwd-crypto
diff options
context:
space:
mode:
authorHemant Agrawal <hemant.agrawal@nxp.com>2017-08-23 17:54:03 +0530
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2017-10-12 08:21:24 +0100
commit455446276493a68117f738b2b778f2791751a2a7 (patch)
tree37d4a9e8cafda7c8eb06ff0eccd415f3cde631c3 /examples/l2fwd-crypto
parent5518fc95427891e8bcf72f461cdaa38604226442 (diff)
downloaddpdk-455446276493a68117f738b2b778f2791751a2a7.zip
dpdk-455446276493a68117f738b2b778f2791751a2a7.tar.gz
dpdk-455446276493a68117f738b2b778f2791751a2a7.tar.xz
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 <hemant.agrawal@nxp.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Diffstat (limited to 'examples/l2fwd-crypto')
-rw-r--r--examples/l2fwd-crypto/main.c1
1 files changed, 1 insertions, 0 deletions
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, ":")) {