From 964b5869aff16b147431aa4e52c70a99d1521bb3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 15 May 2018 20:12:29 -0400 Subject: touch up --- lib/dedupe-range.c | 4 ++-- src/cow-dedupe-range.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/dedupe-range.c b/lib/dedupe-range.c index dea70c7..32296c0 100644 --- a/lib/dedupe-range.c +++ b/lib/dedupe-range.c @@ -57,9 +57,9 @@ void dedupe_range(struct range src, struct range *dsts) { if (range->info[i].bytes_deduped != bytes_deduped) { error(0, errno, "dedupe: %"PRIu64" != %"PRIu64": %s", bytes_deduped, - /* on platforms where both "long" and "long long" + /* On platforms where both "long" and "long long" * are 64 bits, linux __u64 might disagree with - * glibc uint64_t and thus PRIu64 */ + * glibc uint64_t and thus PRIu64. */ (uint64_t)range->info[i].bytes_deduped, dsts[files_deduped+i].filename); erred = true; diff --git a/src/cow-dedupe-range.c b/src/cow-dedupe-range.c index 7508f04..33d62b0 100644 --- a/src/cow-dedupe-range.c +++ b/src/cow-dedupe-range.c @@ -67,12 +67,16 @@ int main(int argc, char *argv[]) { assert(false); } } - if (argc - optind < 5) { error(0, 0, "too few arguments"); fprintf(stderr, "Try '%s --help' for more information.\n", program_invocation_name); return 2; } + if ((argc - optind - 3) % 2 != 0) { + error(0, 0, "wrong number of arguments"); + fprintf(stderr, "Try '%s --help' for more information.\n", program_invocation_name); + return 2; + } struct range src; src.filename = argv[optind]; -- cgit v1.2.3