app/crypto-perf: fix size of expression
authorJacek Piasecki <jacekx.piasecki@intel.com>
Fri, 10 Feb 2017 13:26:15 +0000 (14:26 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 10 Feb 2017 15:06:04 +0000 (16:06 +0100)
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 <jacekx.piasecki@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test-crypto-perf/main.c

index 7fbda7a..c1eaaff 100644 (file)
@@ -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);