From: Jasvinder Singh Date: Fri, 27 Oct 2017 10:47:30 +0000 (+0100) Subject: table: fix LRU hash table parameters check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=dc3c853ce230699ef8a5c08736e094f61d00158c;p=dpdk.git table: fix LRU hash table parameters check 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 --- diff --git a/lib/librte_table/rte_table_hash_lru.c b/lib/librte_table/rte_table_hash_lru.c index 139b8fb6a4..a07392fdd8 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; }