From ec46b7c60ee22fdb836a4b2bcf97153c632173d2 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Wed, 18 Oct 2017 12:21:34 +0200 Subject: ipsec: use boolean or vs. bitwise or to avoid compiler error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ubuntu 17.04, gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2), "make build" fails with the few of the errors below: error: suggest parentheses around comparison in operand of ‘|’ [-Werror=parentheses] is_aead = (sa0->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128 | Solution: use the logical rather than the bitwise or. Change-Id: Iffcc1ed2e68b14b248159cb117593d32c623c553 Signed-off-by: Andrew Yourtchenko --- src/plugins/dpdk/ipsec/ipsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/dpdk/ipsec/ipsec.c') diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c index 2fd331c1ccd..4bae8c1b0f4 100644 --- a/src/plugins/dpdk/ipsec/ipsec.c +++ b/src/plugins/dpdk/ipsec/ipsec.c @@ -317,8 +317,8 @@ crypto_set_auth_xform (struct rte_crypto_sym_xform *xform, xform->auth.key.length = a->key_len; xform->auth.digest_length = a->trunc_size; #if DPDK_NO_AEAD - if (sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128 | - sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_192 | + if (sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128 || + sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_192 || sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_256) xform->auth.algo = RTE_CRYPTO_AUTH_AES_GCM; xform->auth.add_auth_data_length = sa->use_esn ? 12 : 8; -- cgit 1.2.3-korg