Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / symm / rc2.c
index df59425..97963fe 100644 (file)
@@ -250,6 +250,7 @@ void rc2_dblk(const rc2_ctx *k, const uint32 *s, uint32 *dst)
 
 #ifdef TEST_RIG
 
+#include <mLib/macros.h>
 #include <mLib/quis.h>
 #include <mLib/testrig.h>
 
@@ -276,7 +277,7 @@ static int verify(dstr *v)
   BLKC_MOVE(RC2, d, p);
   rc2_eblk(&k, d, d);
   BLKC_STORE(RC2, b.buf, d);
-  if (memcmp(b.buf, v[3].buf, RC2_BLKSZ)) {
+  if (MEMCMP(b.buf, !=, v[3].buf, RC2_BLKSZ)) {
     ok = 0;
     printf("\nfail encryption:"
           "\n\tkey        = ");
@@ -293,7 +294,7 @@ static int verify(dstr *v)
   BLKC_MOVE(RC2, d, c);
   rc2_dblk(&k, d, d);
   BLKC_STORE(RC2, b.buf, d);
-  if (memcmp(b.buf, v[2].buf, RC2_BLKSZ)) {
+  if (MEMCMP(b.buf, !=, v[2].buf, RC2_BLKSZ)) {
     ok = 0;
     printf("\nfail decryption:"
           "\n\tkey        = ");