[CRIU] [PATCH] crtools: fixed format strings

Andrew Vagin avagin at openvz.org
Wed Dec 25 14:24:22 PST 2013


Use the format specifier %zu instead of %lu to print a size_t integer.

Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 cr-dedup.c  |    2 +-
 page-read.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cr-dedup.c b/cr-dedup.c
index ece334d..de69c5e 100644
--- a/cr-dedup.c
+++ b/cr-dedup.c
@@ -80,7 +80,7 @@ static int cr_dedup_one_pagemap(int pid)
 		goto exit;
 
 	while (1) {
-		pr_debug("dedup iovec base=%lu, len=%lu\n", (unsigned long)iov.iov_base, iov.iov_len);
+		pr_debug("dedup iovec base=%lu, len=%zu\n", (unsigned long)iov.iov_base, iov.iov_len);
 		if (!pr.pe->in_parent) {
 			ret = dedup_one_iovec(prp, &iov);
 			if (ret)
diff --git a/page-read.c b/page-read.c
index 2afacf3..e929227 100644
--- a/page-read.c
+++ b/page-read.c
@@ -103,7 +103,7 @@ int seek_pagemap_page(struct page_read *pr, unsigned long vaddr, bool warn)
 
 		if (vaddr < pr->cvaddr) {
 			if (warn)
-				pr_err("Missing %lu in parent pagemap, current iov: base=%lu,len=%lu\n",
+				pr_err("Missing %lu in parent pagemap, current iov: base=%lu,len=%zu\n",
 					vaddr, (unsigned long)iov.iov_base, iov.iov_len);
 			return -1;
 		}
-- 
1.7.10.4



More information about the CRIU mailing list