crypto: Fix scanbuild issue on Fedora30.

Issue reports:
vbdev_crypto.c:695:12: warning: The left operand of '+' is a garbage value
                iv_ptr = rte_crypto_op_ctod_offset(crypto_ops[crypto_index], uint8_t *,

Change-Id: I1a4f89111e94a13d8daf38070aa69306783a83c5
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
yidong0635 2019-07-19 07:11:59 -04:00 committed by Changpeng Liu
parent 2ab927030d
commit c0d4f7145e

View File

@ -631,6 +631,9 @@ _crypto_operation(struct spdk_bdev_io *bdev_io, enum rte_crypto_cipher_operation
} }
/* Allocate crypto operations. */ /* Allocate crypto operations. */
#ifdef DEBUG
memset(crypto_ops, 0, sizeof(crypto_ops));
#endif
allocated = rte_crypto_op_bulk_alloc(g_crypto_op_mp, allocated = rte_crypto_op_bulk_alloc(g_crypto_op_mp,
RTE_CRYPTO_OP_TYPE_SYMMETRIC, RTE_CRYPTO_OP_TYPE_SYMMETRIC,
crypto_ops, cryop_cnt); crypto_ops, cryop_cnt);