diff options
author | Luke Shumaker <lukeshu@beefcake.parabola.nu> | 2018-05-15 20:12:29 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@beefcake.parabola.nu> | 2018-05-15 20:12:29 -0400 |
commit | 964b5869aff16b147431aa4e52c70a99d1521bb3 (patch) | |
tree | 4596366ae33a3bed28944886e738cbad08793471 | |
parent | c787006ee3742ee8384210c4355f73aef7c8d0b8 (diff) |
touch up
-rw-r--r-- | lib/dedupe-range.c | 4 | ||||
-rw-r--r-- | 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]; |