projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dsig.c: Allow precomputed hashes to be read from a file.
[u/mdw/catacomb]
/
hashsum.c
diff --git
a/hashsum.c
b/hashsum.c
index
23b5d56
..
d12c506
100644
(file)
--- a/
hashsum.c
+++ b/
hashsum.c
@@
-113,6
+113,11
@@
static int checkhash(const gchash *gch, unsigned f,
}
}
}
}
+ 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);
dstr_destroy(&dl);
dstr_destroy(&df);
xfree(hfp.hbuf);
@@
-236,7
+241,7
@@
int main(int argc, char *argv[])
{
unsigned f = 0;
const gchash *gch = 0;
{
unsigned f = 0;
const gchash *gch = 0;
- const encodeops *e = &encodingtab[
0
];
+ const encodeops *e = &encodingtab[
ENC_HEX
];
int rc;
/* --- Initialization --- */
int rc;
/* --- Initialization --- */