summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-03-21 16:47:31 +0100
committerDaniel Mack <github@zonque.org>2016-03-21 16:47:31 +0100
commite31512b1c93a7ebd7e67730ac6d5d9a15b9b51ab (patch)
tree539abf4210eb0e1b8efcc76d6c49b146a6630f2d
parent68de79d6a42ac6da4268ac48b699a6cd553afc14 (diff)
parentfa13cf9e218ae0bb32ad169d0e83b007e1cb5dea (diff)
Merge pull request #2878 from martinpitt/master
test-copy: use correct data type for max_bytes
-rw-r--r--src/test/test-copy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-copy.c b/src/test/test-copy.c
index 1462affbcf..cb437754b4 100644
--- a/src/test/test-copy.c
+++ b/src/test/test-copy.c
@@ -180,14 +180,14 @@ static void test_copy_bytes(void) {
assert_se(r == -EBADF);
}
-static void test_copy_bytes_regular_file(const char *src, bool try_reflink, size_t max_bytes) {
+static void test_copy_bytes_regular_file(const char *src, bool try_reflink, uint64_t max_bytes) {
char fn2[] = "/tmp/test-copy-file-XXXXXX";
char fn3[] = "/tmp/test-copy-file-XXXXXX";
_cleanup_close_ int fd = -1, fd2 = -1, fd3 = -1;
int r;
struct stat buf, buf2, buf3;
- log_info("%s try_reflink=%s max_bytes=%zu", __func__, yes_no(try_reflink), max_bytes);
+ log_info("%s try_reflink=%s max_bytes=%" PRIu64, __func__, yes_no(try_reflink), max_bytes);
fd = open(src, O_RDONLY | O_CLOEXEC | O_NOCTTY);
assert_se(fd >= 0);
@@ -221,7 +221,7 @@ static void test_copy_bytes_regular_file(const char *src, bool try_reflink, size
assert_se(fstat(fd2, &buf2) == 0);
assert_se(fstat(fd3, &buf3) == 0);
- assert_se((size_t) buf2.st_size == MIN((size_t) buf.st_size, max_bytes));
+ assert_se((uint64_t) buf2.st_size == MIN((uint64_t) buf.st_size, max_bytes));
assert_se(buf3.st_size == buf2.st_size);
unlink(fn2);