Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / symm / hmac-def.h
index 9ac8fb9..76d578d 100644 (file)
@@ -359,6 +359,7 @@ HMAC_TESTX(PRE, pre, name, fname)
 
 #include <stdio.h>
 
+#include <mLib/macros.h>
 #include <mLib/dstr.h>
 #include <mLib/quis.h>
 #include <mLib/testrig.h>
@@ -399,7 +400,7 @@ static int macverify(dstr *v)                                               \
       csz -= i;                                                                \
     }                                                                  \
     pre##_macdone(&cctx, d.buf);                                       \
-    if (memcmp(d.buf, v[2].buf, PRE##_HASHSZ) != 0) {                  \
+    if (MEMCMP(d.buf, !=, v[2].buf, PRE##_HASHSZ)) {                   \
       printf("\nfail:\n\tstep = %i\n\tinput = `%s'\n\tkey = ",         \
             *ip, v[0].buf);                                            \
       type_hex.dump(&v[1], stdout);                                    \