From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 9372D1BA41 for ; Fri, 27 Oct 2017 12:34:54 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 27 Oct 2017 03:34:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,304,1505804400"; d="scan'208";a="168348037" Received: from silpixa00381635.ir.intel.com (HELO silpixa00381635.ger.corp.intel.com) ([10.237.222.149]) by fmsmga006.fm.intel.com with ESMTP; 27 Oct 2017 03:34:51 -0700 From: Jasvinder Singh To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, john.mcnamara@intel.com Date: Fri, 27 Oct 2017 11:47:30 +0100 Message-Id: <20171027104730.1724-1-jasvinder.singh@intel.com> X-Mailer: git-send-email 2.9.3 Subject: [dpdk-dev] [PATCH] lib/librte_table: fix copy paste error in lru hash table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Oct 2017 10:34:55 -0000 Fixes the copy paste error in lru hash table parameters check. Coverity issue: 198433 Fixes: b5cde2cb8c81 ("table: rework variable size key lru hash table") Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- lib/librte_table/rte_table_hash_lru.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/librte_table/rte_table_hash_lru.c b/lib/librte_table/rte_table_hash_lru.c index 139b8fb..a07392f 100644 --- a/lib/librte_table/rte_table_hash_lru.c +++ b/lib/librte_table/rte_table_hash_lru.c @@ -148,15 +148,14 @@ check_params_create(struct rte_table_hash_params *params) } /* n_keys */ - if ((params->n_keys == 0) || - (!rte_is_power_of_2(params->n_keys))) { + if (params->n_keys == 0) { RTE_LOG(ERR, TABLE, "%s: n_keys invalid value\n", __func__); return -EINVAL; } /* n_buckets */ if ((params->n_buckets == 0) || - (!rte_is_power_of_2(params->n_keys))) { + (!rte_is_power_of_2(params->n_buckets))) { RTE_LOG(ERR, TABLE, "%s: n_buckets invalid value\n", __func__); return -EINVAL; } -- 2.9.3