From fbf5a27dbdbb61fbcdc135ed75d7ca5f2eab66b5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 1 Aug 2009 12:46:35 -0700 Subject: [PATCH] mincore: bad cast caused misprinted output on 32-bit Due to the bad cast to unsigned long in the parameter before it, printf was mishandling the bit output as the last parameter. --- mincore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mincore.c b/mincore.c index c3aa618..3314d3c 100644 --- a/mincore.c +++ b/mincore.c @@ -59,7 +59,7 @@ static void mincore_stats(const char *path, off_t offset, off_t len) for (i = 0; i < vec_len; ++i) printf(fmt, path, - (unsigned long)(page_size() * i) + map_offset, + (unsigned long)((page_size() * i) + map_offset), vec[i] & 1); err_munmap: munmap(map, map_len); -- 2.11.4.GIT