chiark / gitweb /
Fix bizarre `if (!consttime_memeq(X, Y, N)!=0)' idioms.
[secnet] / site.c
diff --git a/site.c b/site.c
index c702c7885095b009ca5bea65d259f9d778964823..4ec56dfa5076da4a8a59eea7d7a7ffde74e7e87b 100644 (file)
--- a/site.c
+++ b/site.c
@@ -767,7 +767,7 @@ static bool_t check_msg(struct site *st, uint32_t type, struct msg *m,
        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;
     }