Re: [PATCH] crypto/testmgr.c: fix !x==y confusion
From: Herbert Xu
Date: Tue Aug 09 2016 - 07:02:00 EST
On Fri, Jul 29, 2016 at 04:32:09PM +0800, yanjiang.jin@xxxxxxxxxxxxx wrote:
> From: Yanjiang Jin <yanjiang.jin@xxxxxxxxxxxxx>
>
> "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@xxxxxxxxxxxxx>
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt