Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1458606

Re: [PATCH] crypto/testmgr.c: fix !x==y confusion

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: [PATCH] crypto/testmgr.c: fix !x==y confusion
Date 2016-08-09 13:10 +0200
Message-ID <s4d4Z-6KH-5@gated-at.bofh.it> (permalink)
References <s0buN-2d6-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 29, 2016 at 04:32:09PM +0800, yanjiang.jin@windriver.com wrote:
> From: Yanjiang Jin <yanjiang.jin@windriver.com>
> 
> "if (!ret == template[i].fail)" is confusing to compilers (gcc5):
> 
> crypto/testmgr.c: In function '__test_aead':
> crypto/testmgr.c:531:12: warning: logical not is only applied to the
> left hand side of comparison [-Wlogical-not-parentheses]
>    if (!ret == template[i].fail) {
>             ^
> 
> Let there be 'if (template[i].fail == !ret) '.
> 
> Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] crypto/testmgr.c: fix !x==y confusion <yanjiang.jin@windriver.com> - 2016-07-29 10:40 +0200
  Re: [PATCH] crypto/testmgr.c: fix !x==y confusion Herbert Xu <herbert@gondor.apana.org.au> - 2016-08-09 13:10 +0200

csiph-web