about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-08-01 12:46:35 -0700
committerEric Wong <normalperson@yhbt.net>2009-08-01 12:46:35 -0700
commitfbf5a27dbdbb61fbcdc135ed75d7ca5f2eab66b5 (patch)
treede567cbcc621b7a6b949b4db2fba3080b237597c
parentd5c06c6f15875c1114ad0db81b0ac41246373366 (diff)
downloadpcu-fbf5a27dbdbb61fbcdc135ed75d7ca5f2eab66b5.tar.gz
mincore: bad cast caused misprinted output on 32-bit v0.2.1
Due to the bad cast to unsigned long in the parameter before it,
printf was mishandling the bit output as the last parameter.
-rw-r--r--mincore.c2
1 files changed, 1 insertions, 1 deletions
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);