Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / key / passphrase.c
index 6f0780f..3a287bd 100644 (file)
@@ -35,6 +35,7 @@
 #include <unistd.h>
 
 #include <mLib/dstr.h>
+#include <mLib/macros.h>
 
 #include "passphrase.h"
 #include "pixie.h"
@@ -122,7 +123,7 @@ int passphrase_read(const char *tag, unsigned mode, char *buf, size_t sz)
     char b[1024];
     DRESET(&d);
     dstr_putf(&d, "Verify passphrase %s: ", tag);
-    if (pixie_getpass(d.buf, b, sizeof(b)) || strcmp(b, buf) != 0) {
+    if (pixie_getpass(d.buf, b, sizeof(b)) || STRCMP(b, !=, buf)) {
       memset(b, 0, sizeof(b));
       goto fail;
     }