From: Jacek Piasecki Date: Fri, 10 Feb 2017 13:26:15 +0000 (+0100) Subject: app/crypto-perf: fix size of expression X-Git-Tag: spdx-start~4502 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7fb95c36028a8040b779e99eb87c231b086a0b2e;p=dpdk.git app/crypto-perf: fix size of expression This commit fixes 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 Acked-by: Pablo de Lara --- diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index 7fbda7a856..c1eaaff9f7 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -45,7 +45,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs) 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);