[PATCH 2/5] Fix bizarre `if (!consttime_memeq(X, Y, N)!=0)' idioms.
Ian Jackson
ijackson at chiark.greenend.org.uk
Sat Sep 21 10:57:34 BST 2019
Mark Wooding writes ("[PATCH 2/5] Fix bizarre `if (!consttime_memeq(X, Y, N)!=0)' idioms."):
> Clang thinks the `!' is in the wrong place. I think the `!=0' isn't
> doing any work, so I've deleted it.
...
> - if (!consttime_memeq(m->nR,st->remoteN,NONCELEN)!=0) {
This stems from 5ad34db2ccbb "memcmp: Introduce and use
consttime_memeq",
- if (memcmp(m->nR,st->remoteN,NONCELEN)!=0) {
+ if (!consttime_memeq(m->nR,st->remoteN,NONCELEN)!=0) {
at which time the !=0 was already redundant and became more confusing.
I have added that information to the commit message.
Thanks,
Ian.
--
Ian Jackson <ijackson at chiark.greenend.org.uk> These opinions are my own.
If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.
More information about the sgo-software-discuss
mailing list