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 B50F6A034C; Thu, 24 Feb 2022 16:58:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01A5C426ED; Thu, 24 Feb 2022 16:58:22 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id B1F97411FE; Thu, 24 Feb 2022 16:58:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645718300; x=1677254300; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7ZE1elzOJhPZj5cdyrOgKsErHngtM5/M/tUVJx4BjUQ=; b=atQwwk5hY96z2NxqwKX4D2YiuR96fA7kWY9vgYK6Q2+bTR3RMKYhuilf FJmaPYxgGyGtsqutxjDUrRtmXjVq3tG66Cvj4uSw1ucti8pdXV8xwVkqW DBkb36FakbBoPxS7l601NV5cb8h8oxDTIWB6YNu3X8EiKJ2djXvMn9Ecg RZgGBjFqCPdR4mM8Hi+e8aff3rjY+8HdMuZ6LTPWS7gPno28pGPRw5I9T eFb2YF911Ikl3XGrXlSceui4tx4NCMEQdGuK5lBI/JtFInZ0o3BrRblrS 3Hq0b+R6tvVGxJ9Shj953Ln+N6jOOSQDoHQZXWATDJrENhL534FdXD6aj g==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="232241722" X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="232241722" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 07:58:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="533183130" Received: from silpixa00400636.ir.intel.com ([10.237.213.19]) by orsmga007.jf.intel.com with ESMTP; 24 Feb 2022 07:58:03 -0800 From: Pablo de Lara To: yipeng1.wang@intel.com, byron.marohn@intel.com Cc: dev@dpdk.org, Pablo de Lara , stable@dpdk.org Subject: [PATCH v2 2/2] efd: fix uninitialized structure Date: Thu, 24 Feb 2022 15:57:59 +0000 Message-Id: <20220224155759.819460-2-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220224155759.819460-1-pablo.de.lara.guarch@intel.com> References: <20220224154801.819320-1-pablo.de.lara.guarch@intel.com> <20220224155759.819460-1-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Coverity flags that both elements of efd_online_group_entry are used uninitialized. This is OK because this structure is initially used for starting values, so any value is OK. Coverity ID: 375868 Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") Cc: pablo.de.lara.guarch@intel.com Cc: stable@dpdk.org Signed-off-by: Pablo de Lara --- -v2: Fixed typo in commit message --- lib/efd/rte_efd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c index 560cd78961..86910e587c 100644 --- a/lib/efd/rte_efd.c +++ b/lib/efd/rte_efd.c @@ -1162,7 +1162,7 @@ rte_efd_update(struct rte_efd_table * const table, const unsigned int socket_id, { uint32_t chunk_id = 0, group_id = 0, bin_id = 0; uint8_t new_bin_choice = 0; - struct efd_online_group_entry entry; + struct efd_online_group_entry entry = {0}; int status = efd_compute_update(table, socket_id, key, value, &chunk_id, &group_id, &bin_id, -- 2.25.1