Don't print any stats if the store is empty - dedup - deduplicating backup program
HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit f5519d6da7cdbd5609fb552aee0ae078ac63ef8a
DIR parent 99c3b317f9e0558d624235439a4162306f8e549d
HTML Author: sin <sin@2f30.org>
Date: Tue, 19 Feb 2019 12:58:40 +0000
Don't print any stats if the store is empty
Diffstat:
M dedup.c | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
DIR diff --git a/dedup.c b/dedup.c
@@ -224,6 +224,9 @@ print_md(uint8_t *md, size_t size)
void
print_stats(struct stats *st)
{
+ if (st->nblks == 0)
+ return;
+
fprintf(stderr, "original size: %llu bytes\n",
(unsigned long long)st->orig_size);
fprintf(stderr, "compressed size: %llu bytes\n",