From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 32A4FA0503 for ; Thu, 24 Mar 2022 17:16:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23B6B42834; Thu, 24 Mar 2022 17:16:54 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 63B0540683 for ; Thu, 24 Mar 2022 17:16:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648138611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ff0riJj848KVNLxd6Z5KzTZVmcPYyWR4lE0BuqgTpNw=; b=jG4j5X8SCD6OW3jZm/a88br1KbXwD3q6EGLgLJePum7NcawBEnArXZJaRR4/93KGtc26Pc loJBlnB/gK5PjWlCAj7EPs7coGwEnOcDSW76fTuYdgmUmU97smtXy3pVOD8nTSFqnsYUd/ 1dkAD8Eqy1sobI95URLPe2R0zS/EPLs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-436-kZCF5-XWP8WSWiDQaBD_mQ-1; Thu, 24 Mar 2022 12:16:36 -0400 X-MC-Unique: kZCF5-XWP8WSWiDQaBD_mQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9E798803D7A; Thu, 24 Mar 2022 16:16:35 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.195.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1824F142B94D; Thu, 24 Mar 2022 16:16:33 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Ori Kam , Xiaoyun Li , Aman Singh , Yuying Zhang , Ferruh Yigit , Wei Zhao Subject: [PATCH] app/testpmd: remove useless pointer checks Date: Thu, 24 Mar 2022 17:15:03 +0100 Message-Id: <20220324161503.13047-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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.23.0