X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/0f00dc4c8eb47e67bc0f148c2dd109f73a451e0a..bd6d65e32b835551677456bf286d09ced6859882:/symm/serpent-check.c diff --git a/symm/serpent-check.c b/symm/serpent-check.c index 7f95ffc7..190096fb 100644 --- a/symm/serpent-check.c +++ b/symm/serpent-check.c @@ -32,6 +32,7 @@ #include #include +#include #include "serpent-sbox.h" @@ -71,7 +72,7 @@ static int check(unsigned a, unsigned b, unsigned c, unsigned d, *q++ = (a & 1) | ((b & 1) << 1) | ((c & 1) << 2) | ((d & 1) << 3); a >>= 1; b >>= 1; c >>= 1; d >>= 1; } - return (memcmp(buf, p, sizeof(buf))); + return (MEMCMP(buf, ==, p, sizeof(buf)) ? 0 : -1); } #define CHECK(i) do { \