Clang thinks the `!' is in the wrong place. I think the `!=0' isn't
doing any work, so I've deleted it.
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.
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
return False;
}
if (type==LABEL_MSG2) return True;
- if (!consttime_memeq(m->nR,st->remoteN,NONCELEN)!=0) {
+ if (!consttime_memeq(m->nR,st->remoteN,NONCELEN)) {
*error="wrong remotely-generated nonce";
return False;
}
serpentbe_encrypt(&ti->mackey,macplain,macacc);
}
serpentbe_encrypt(&ti->mackey,macacc,macacc);
- if (!consttime_memeq(macexpected,macacc,16)!=0) {
+ if (!consttime_memeq(macexpected,macacc,16)) {
*errmsg="invalid MAC";
return transform_apply_err;
}