diff options
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/qoriq/0024-cryptodev-clarify-code-remove-assignments-from-condi.patch')
-rw-r--r-- | recipes-connectivity/openssl/openssl-qoriq/qoriq/0024-cryptodev-clarify-code-remove-assignments-from-condi.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/qoriq/0024-cryptodev-clarify-code-remove-assignments-from-condi.patch b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0024-cryptodev-clarify-code-remove-assignments-from-condi.patch new file mode 100644 index 0000000..27ccd95 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0024-cryptodev-clarify-code-remove-assignments-from-condi.patch @@ -0,0 +1,37 @@ +From cb6842dac159b40acdc755526b0ba0afb61d9d64 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica <cristian.stoica@nxp.com> +Date: Mon, 14 Dec 2015 14:02:00 +0200 +Subject: [PATCH 24/48] cryptodev: clarify code, remove assignments from + conditionals + +Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> +--- + crypto/engine/eng_cryptodev.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 1910c89..fcfd232 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -1559,14 +1559,16 @@ static int cryptodev_digest_init(EVP_MD_CTX *ctx) + struct session_op *sess = &state->d_sess; + int digest; + +- if ((digest = digest_nid_to_cryptodev(ctx->digest->type)) == NID_undef) { ++ digest = digest_nid_to_cryptodev(ctx->digest->type); ++ if (digest == NID_undef) { + printf("cryptodev_digest_init: Can't get digest \n"); + return (0); + } + + memset(state, 0, sizeof(struct dev_crypto_state)); + +- if ((state->d_fd = get_dev_crypto()) < 0) { ++ state->d_fd = get_dev_crypto(); ++ if (state->d_fd < 0) { + printf("cryptodev_digest_init: Can't get Dev \n"); + return (0); + } +-- +2.7.0 + |