]> git.droids-corp.org - dpdk.git/commitdiff
app/testpmd: remove useless pointer checks
authorDavid Marchand <david.marchand@redhat.com>
Thu, 24 Mar 2022 16:15:03 +0000 (17:15 +0100)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Fri, 20 May 2022 10:29:19 +0000 (12:29 +0200)
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 <david.marchand@redhat.com>
app/test-pmd/cmdline_flow.c

index fc4a6d9cca4f6d5d1d7014d66b84ff49d4ec96af..e3269e278dde8fc95609f5ca4fcbc5a4c5eef1da 100644 (file)
@@ -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;