From d66c6d6af88f0d0a8cbbbbb6c53659988aafaffd Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Mon, 23 Mar 2020 15:23:04 +0000 Subject: [PATCH] crypto: tls - fix logical-not-parentheses compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following warning: crypto/testmgr.c: In function ‘__test_tls’: crypto/testmgr.c:2648:12: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!ret == template[i].fail) { ^~ Fixes: 8abdaaeda43 ("crypto: add support for TLS 1.0 record encryption") Signed-off-by: Iuliana Prodan Reviewed-by: Horia Geantă Reviewed-by: Valentin Ciocoi R?dulescu --- crypto/testmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 7b938f2444d8..a8b7fb608e2e 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -2390,7 +2390,7 @@ static int __test_tls(struct crypto_aead *tfm, int enc, memcpy(key, template[i].key, template[i].klen); ret = crypto_aead_setkey(tfm, key, template[i].klen); - if (!ret == template[i].fail) { + if ((!ret) == template[i].fail) { pr_err("alg: tls%s: setkey failed on test %d for %s: flags=%x\n", d, i, algo, crypto_aead_get_flags(tfm)); goto out;