From: Jacek Piasecki <jacekx.piasecki@intel.com>
To: declan.doherty@intel.com
Cc: dev@dpdk.org, pablo.de.lara.guarch@intel.com,
Jacek Piasecki <jacekx.piasecki@intel.com>
Subject: [dpdk-dev] [PATCH v2] app/test-crypto-perf: fix incorrect size of expression
Date: Fri, 10 Feb 2017 14:26:15 +0100 [thread overview]
Message-ID: <1486733175-24640-1-git-send-email-jacekx.piasecki@intel.com> (raw)
In-Reply-To: <1486569881-16220-2-git-send-email-jacekx.piasecki@intel.com>
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 <jacekx.piasecki@intel.com>
---
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
next prev parent reply other threads:[~2017-02-10 11:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 16:04 [dpdk-dev] [PATCH] app/test-crypto-perf: fix big paremeter passed by value Jacek Piasecki
2017-02-08 16:04 ` [dpdk-dev] [PATCH] app/test-crypto-perf: fix incorrect size of expression Jacek Piasecki
2017-02-09 23:53 ` De Lara Guarch, Pablo
2017-02-10 13:26 ` Jacek Piasecki [this message]
2017-02-10 11:28 ` [dpdk-dev] [PATCH v2] " De Lara Guarch, Pablo
2017-02-10 11:48 ` De Lara Guarch, Pablo
2017-02-09 23:41 ` [dpdk-dev] [PATCH] app/test-crypto-perf: fix big paremeter passed by value De Lara Guarch, Pablo
2017-02-09 23:48 ` De Lara Guarch, Pablo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1486733175-24640-1-git-send-email-jacekx.piasecki@intel.com \
--to=jacekx.piasecki@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).