}
}
+ if (ferror(hfp.fp)) {
+ moan("error reading input `%s': %s",
+ file ? file : "<stdin>", strerror(errno));
+ rc = EXIT_FAILURE;
+ }
dstr_destroy(&dl);
dstr_destroy(&df);
xfree(hfp.hbuf);
moan("%lu of %lu file(s) failed %s check", nfail, n, hfp.gch->name);
else if (!n)
moan("no files checked");
- return (0);
+ return (rc);
}
static int dohash(const gchash *gch, unsigned f,
{
unsigned f = 0;
const gchash *gch = 0;
- const encodeops *e = &encodingtab[0];
+ const encodeops *e = &encodingtab[ENC_HEX];
int rc;
/* --- Initialization --- */