From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id BBF202A5E for ; Fri, 10 Feb 2017 12:24:20 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2017 03:24:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,141,1484035200"; d="scan'208";a="42500625" Received: from gklab-246-019.igk.intel.com (HELO intel.com) ([10.217.246.19]) by orsmga002.jf.intel.com with SMTP; 10 Feb 2017 03:24:15 -0800 Received: by intel.com (sSMTP sendmail emulation); Fri, 10 Feb 2017 14:26:21 +0100 From: Jacek Piasecki To: declan.doherty@intel.com Cc: dev@dpdk.org, pablo.de.lara.guarch@intel.com, Jacek Piasecki Date: Fri, 10 Feb 2017 14:26:15 +0100 Message-Id: <1486733175-24640-1-git-send-email-jacekx.piasecki@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486569881-16220-2-git-send-email-jacekx.piasecki@intel.com> References: <1486569881-16220-2-git-send-email-jacekx.piasecki@intel.com> Subject: [dpdk-dev] [PATCH v2] app/test-crypto-perf: fix incorrect size of expression 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, 10 Feb 2017 11:24:21 -0000 Fix problem of passing a pointer to sizeof() function. Now the size of enabled_cdevs structure is passed by RTE_CRYPTO_MAX_DEVS. Coverity issue: 141068 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Jacek Piasecki --- v2: * RTE_CRYPTO_MAX_DEVS is passed to rte_cryptodev_devices_get() directly app/test-crypto-perf/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index 634ea5f..ac4f484 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -45,7 +45,7 @@ int ret; enabled_cdev_count = rte_cryptodev_devices_get(opts->device_type, - enabled_cdevs, RTE_DIM(enabled_cdevs)); + enabled_cdevs, RTE_CRYPTO_MAX_DEVS); if (enabled_cdev_count == 0) { printf("No crypto devices type %s available\n", opts->device_type); -- 1.9.1