Skip to content

Commit

Permalink
crypto: tls - fix logical-not-parentheses compile warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Horia Geantă <[email protected]>
Reviewed-by: Valentin Ciocoi R?dulescu <[email protected]>
  • Loading branch information
iuliana-prodan authored and horiag committed Apr 7, 2020
1 parent 92d77a4 commit d66c6d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/testmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d66c6d6

Please sign in to comment.