dedup

deduplicating backup program
git clone git://git.2f30.org/dedup
Log | Files | Refs | README | LICENSE

commit 312b8de3f21fe167b82d288362442364c51a0431
parent f5519d6da7cdbd5609fb552aee0ae078ac63ef8a
Author: sin <sin@2f30.org>
Date:   Tue, 19 Feb 2019 14:59:53 +0000

Fixup print_md prototype

Diffstat:
Mdedup.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dedup.c b/dedup.c @@ -213,12 +213,12 @@ decomp(uint8_t *in, uint8_t *out, size_t insize, size_t outsize) } void -print_md(uint8_t *md, size_t size) +print_md(FILE *fp, uint8_t *md, size_t size) { size_t i; for (i = 0; i < size; i++) - fprintf(stderr, "%02x", md[i]); + fprintf(fp, "%02x", md[i]); } void @@ -605,10 +605,10 @@ check(struct ent *ent, void *arg) fprintf(stderr, "Block hash mismatch\n"); fprintf(stderr, " Expected hash: "); - print_md(ent->md, sizeof(ent->md)); + print_md(stderr, ent->md, sizeof(ent->md)); fputc('\n', stderr); fprintf(stderr, " Actual hash: "); - print_md(md, sizeof(md)); + print_md(stderr, md, sizeof(md)); fputc('\n', stderr); fprintf(stderr, " Offset: %llu\n", (unsigned long long)ent->bdescr[i].offset); @@ -622,7 +622,7 @@ check(struct ent *ent, void *arg) int list(struct ent *ent, void *arg) { - print_md(ent->md, sizeof(ent->md)); + print_md(stdout, ent->md, sizeof(ent->md)); if (ent->msg[0] != '\0') printf("\t%s\n", ent->msg); else