memzap

replay memory writes
git clone git://git.2f30.org/memzap
Log | Files | Refs | README | LICENSE

commit d8542d315fbe1910f0757f4358d9eee165104195
parent b5d06ea433a4a60b0b0eb49543049ff4567b2f9f
Author: sin <sin@2f30.org>
Date:   Sun,  3 Mar 2013 01:19:09 +0000

ops: Cast `pid' to `intmax_t' for printing

Diffstat:
Mlinux_ops.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux_ops.c b/linux_ops.c @@ -33,7 +33,7 @@ readmem(pid_t pid, void *buf, void *offset, size_t size) ssize_t rs; size_t s; - snprintf(tbuf, sizeof(tbuf), "/proc/%d/mem", pid); + snprintf(tbuf, sizeof(tbuf), "/proc/%jd/mem", (intmax_t)pid); fdmem = open(tbuf, O_RDONLY); if (fdmem < 0) err(1, "open");