* [dpdk-dev] [PATCH] lib/pipeline: fix logically dead code
@ 2018-11-05 12:27 Fan Zhang
2018-11-12 16:40 ` Dumitrescu, Cristian
0 siblings, 1 reply; 2+ messages in thread
From: Fan Zhang @ 2018-11-05 12:27 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu
This patches fixes the coverity issue of logically dead code.
Fixes: 96303217a606 ("pipeline: add symmetric crypto table action")
Coverity issue: 323523
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
lib/librte_pipeline/rte_table_action.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/librte_pipeline/rte_table_action.c b/lib/librte_pipeline/rte_table_action.c
index 537e6593e..7c7c8dd82 100644
--- a/lib/librte_pipeline/rte_table_action.c
+++ b/lib/librte_pipeline/rte_table_action.c
@@ -1694,10 +1694,9 @@ get_block_size(const struct rte_crypto_sym_xform *xform, uint8_t cdev_id)
rte_cryptodev_info_get(cdev_id, &dev_info);
- for (i = 0;; i++) {
+ for (i = 0; dev_info.capabilities[i].op != RTE_CRYPTO_OP_TYPE_UNDEFINED;
+ i++) {
cap = &dev_info.capabilities[i];
- if (!cap)
- break;
if (cap->sym.xform_type != xform->type)
continue;
--
2.13.6
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] lib/pipeline: fix logically dead code
2018-11-05 12:27 [dpdk-dev] [PATCH] lib/pipeline: fix logically dead code Fan Zhang
@ 2018-11-12 16:40 ` Dumitrescu, Cristian
0 siblings, 0 replies; 2+ messages in thread
From: Dumitrescu, Cristian @ 2018-11-12 16:40 UTC (permalink / raw)
To: Zhang, Roy Fan, dev
> -----Original Message-----
> From: Zhang, Roy Fan
> Sent: Monday, November 5, 2018 12:27 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH] lib/pipeline: fix logically dead code
>
> This patches fixes the coverity issue of logically dead code.
>
> Fixes: 96303217a606 ("pipeline: add symmetric crypto table action")
> Coverity issue: 323523
>
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
> lib/librte_pipeline/rte_table_action.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/lib/librte_pipeline/rte_table_action.c
> b/lib/librte_pipeline/rte_table_action.c
> index 537e6593e..7c7c8dd82 100644
> --- a/lib/librte_pipeline/rte_table_action.c
> +++ b/lib/librte_pipeline/rte_table_action.c
> @@ -1694,10 +1694,9 @@ get_block_size(const struct
> rte_crypto_sym_xform *xform, uint8_t cdev_id)
>
> rte_cryptodev_info_get(cdev_id, &dev_info);
>
> - for (i = 0;; i++) {
> + for (i = 0; dev_info.capabilities[i].op !=
> RTE_CRYPTO_OP_TYPE_UNDEFINED;
> + i++) {
> cap = &dev_info.capabilities[i];
> - if (!cap)
> - break;
>
> if (cap->sym.xform_type != xform->type)
> continue;
> --
> 2.13.6
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Applied to next-pipeline tree, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-12 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 12:27 [dpdk-dev] [PATCH] lib/pipeline: fix logically dead code Fan Zhang
2018-11-12 16:40 ` Dumitrescu, Cristian
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).