#include <mLib/alloc.h>
#include <mLib/dstr.h>
+#include <mLib/macros.h>
#include <mLib/mdwopt.h>
#include <mLib/quis.h>
#include <mLib/report.h>
unsigned long n = 0, nfail = 0;
int hf;
- if (!file || strcmp(file, "-") == 0)
+ if (!file || STRCMP(file, ==, "-"))
hfp.fp = stdin;
else if ((hfp.fp = fopen(file, fh->f & GSF_RAW ? "r" : "rb")) == 0) {
moan("couldn't open `%s': %s", file, strerror(errno));
rc = EXIT_FAILURE;
continue;
}
- if (memcmp(hfp.hbuf, hfp.hbuf + hfp.gch->hashsz,
- hfp.gch->hashsz) != 0) {
+ if (MEMCMP(hfp.hbuf, !=, hfp.hbuf + hfp.gch->hashsz,
+ hfp.gch->hashsz)) {
if (hfp.f & f_verbose)
fprintf(stderr, "FAIL %s\n", df.buf);
else
int rc = 0;
int rrc;
- if (!file || strcmp(file, "-") == 0)
+ if (!file || STRCMP(file, ==, "-"))
fp = stdin;
else if ((fp = fopen(file, fh->f & GSF_RAW ? "r" : "rb")) == 0) {
moan("couldn't open `%s': %s", file, strerror(errno));
{
char *q = xstrdup(QUIS);
size_t len = strlen(q);
- if (len > 3 && strcmp(q + len - 3, "sum") == 0) {
+ if (len > 3 && STRCMP(q + len - 3, ==, "sum")) {
q[len - 3] = 0;
fh.gch = gethash(q);
}