[CRIU] [PATCH] proc_parse: fixed format strings

Andrey Vagin avagin at openvz.org
Fri Mar 27 05:20:28 PDT 2015


Use the format specifier PRIx64 instead of %lx to print uint64.
integer.

Reported-by: Mr Travis CI
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 proc_parse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proc_parse.c b/proc_parse.c
index ba2efbe..2354561 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -401,7 +401,7 @@ static int handle_vma(pid_t pid, struct vma_area *vma_area,
 		else if (S_ISCHR(st_buf->st_mode) && (st_buf->st_rdev == DEVZERO))
 			/* devzero mapping -- also makes sense */;
 		else {
-			pr_err("Can't handle non-regular mapping on %d's map %#lx\n", pid, vma_area->e->start);
+			pr_err("Can't handle non-regular mapping on %d's map %"PRIx64"\n", pid, vma_area->e->start);
 			goto err;
 		}
 
@@ -460,7 +460,7 @@ err_bogus_mapping:
 	goto err;
 
 err_bogus_mapfile:
-	pr_perror("Can't open %d's mapfile link %lx", pid, vma_area->e->start);
+	pr_perror("Can't open %d's mapfile link %"PRIx64, pid, vma_area->e->start);
 	goto err;
 }
 
-- 
2.1.0



More information about the CRIU mailing list