Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / symm / blkc.h
index bbba763..069c1da 100644 (file)
 
 #include <string.h>
 
+#include <mLib/macros.h>
 #include <mLib/quis.h>
 #include <mLib/testrig.h>
 
@@ -429,7 +430,7 @@ static int pre##_verify(dstr *v)                                    \
   BLKC_MOVE(PRE, d, p);                                                        \
   pre##_eblk(&k, d, d);                                                        \
   BLKC_STORE(PRE, b.buf, d);                                           \
-  if (memcmp(b.buf, v[2].buf, PRE##_BLKSZ)) {                          \
+  if (MEMCMP(b.buf, !=, v[2].buf, PRE##_BLKSZ)) {                      \
     ok = 0;                                                            \
     printf("\nfail encryption:"                                                \
           "\n\tkey        = ");                                        \
@@ -445,7 +446,7 @@ static int pre##_verify(dstr *v)                                    \
   BLKC_MOVE(PRE, d, c);                                                        \
   pre##_dblk(&k, d, d);                                                        \
   BLKC_STORE(PRE, b.buf, d);                                           \
-  if (memcmp(b.buf, v[1].buf, PRE##_BLKSZ)) {                          \
+  if (MEMCMP(b.buf, !=, v[1].buf, PRE##_BLKSZ)) {                      \
     ok = 0;                                                            \
     printf("\nfail decryption:"                                                \
           "\n\tkey        = ");                                        \