Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / symm / salsa20.c
index e7c35f4..7806e6c 100644 (file)
@@ -871,6 +871,7 @@ SALSA20_VARS(DEFXGRAND)
 #include <stdio.h>
 #include <string.h>
 
+#include <mLib/macros.h>
 #include <mLib/quis.h>
 #include <mLib/testrig.h>
 
@@ -900,7 +901,7 @@ static const int perm[] = {
     }                                                                  \
     for (i = 0; i < SALSA20_OUTSZ/4; i++) STORE32_L(d.buf + 4*i, b[i]);        \
                                                                        \
-    if (d.len != v[2].len || memcmp(d.buf, v[2].buf, v[2].len) != 0) { \
+    if (d.len != v[2].len || MEMCMP(d.buf, !=, v[2].buf, v[2].len)) {  \
       ok = 0;                                                          \
       printf("\nfail core:"                                            \
             "\n\titerations = %d"                                      \
@@ -970,7 +971,7 @@ SALSA20_VARS(DEFVCORE)
       }                                                                        \
       if (sz) BASE##_ENCRYPT(r, &ctx, p, q, sz);                       \
                                                                        \
-      if (d.len != v[5].len || memcmp(d.buf, v[5].buf, v[5].len) != 0) { \
+      if (d.len != v[5].len || MEMCMP(d.buf, !=, v[5].buf, v[5].len)) {        \
        ok = 0;                                                         \
        printf("\nfail encrypt:"                                        \
               "\n\tstep           = %lu"                               \