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 CBCF9A034C; Fri, 25 Feb 2022 10:28:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5CBE41180; Fri, 25 Feb 2022 10:27:56 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 7D5564068B; Fri, 25 Feb 2022 10:27:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645781274; x=1677317274; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9TVMiOLTodpskofAG3iLs0GpCjpf3avLf35sEF2JiU4=; b=OodpFg0HeY0ScCkoY+w/vsaOCmP0oblMFG2YDUQjTTaaWgAsSDeWeU6N D8/wiFjztdompTYBT4nnjN/mMy1nTIufBJwC462njJbVTMjX5Eh8HSVAm GkqYCCdDxFRktw4zqweUp9S1jCIIMl6nJRQVcMpz2krADPfLFq2r7Q98l bv02JlLDHDythK54j92OQjg01GnqhCGis4SbtGgIyUvFMwI30Zn0I0GdZ KYgWNToQXXVESZYztAYppe+1aPqp+ormWp4+UHVtiKWhJoW/esszFl8t7 2BkdCElfiUzJl340+zjtkGser/rXiP/dicWSu3gdWTmUtayegHb60UG5a Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="252383117" X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="252383117" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Feb 2022 01:27:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="638182384" Received: from silpixa00400636.ir.intel.com ([10.237.213.19]) by fmsmga002.fm.intel.com with ESMTP; 25 Feb 2022 01:27:50 -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 v3 2/2] efd: fix uninitialized structure Date: Fri, 25 Feb 2022 09:27:45 +0000 Message-Id: <20220225092745.883850-2-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220225092745.883850-1-pablo.de.lara.guarch@intel.com> References: <20220224155759.819460-1-pablo.de.lara.guarch@intel.com> <20220225092745.883850-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 Acked-by: Yipeng Wang --- -v3: Fixed RHEL build -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..bbc6fc585d 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