From 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 24 Mar 2022 17:15:03 +0100 Subject: [PATCH] app/testpmd: remove useless pointer checks Parameters to this static helper can't be NULL. str has already been dereferenced in caller. dst and size point to variable in stack. Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API") Cc: stable@dpdk.org Signed-off-by: David Marchand --- app/test-pmd/cmdline_flow.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index fc4a6d9cca..e3269e278d 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -9338,11 +9338,7 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size) const uint8_t *head = dst; uint32_t left; - /* Check input parameters */ - if ((src == NULL) || - (dst == NULL) || - (size == NULL) || - (*size == 0)) + if (*size == 0) return -1; left = *size; -- 2.20.1