memzap

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

commit 4d8d31613334b41b6fbf9f3f65d1dc416e47b433
parent 81cef98050696b18c97d297b8471817505dd7b36
Author: sin <sin@2f30.org>
Date:   Wed Mar  6 01:07:32 +0000

Use PATH_MAX instead of PATH_MAX - 1

There is some confusion as to what PATH_MAX really means.  Just
stick with PATH_MAX.

Diffstat:
linux_ops.c | 2+-
memzap.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/linux_ops.c b/linux_ops.c @@ -27,7 +27,7 @@ single_step(pid_t pid) void readmem(pid_t pid, void *buf, void *offset, size_t size) { - char tbuf[PATH_MAX - 1]; + char tbuf[PATH_MAX]; int fdmem; int r; ssize_t rs; diff --git a/memzap.c b/memzap.c @@ -24,7 +24,7 @@ static void dump_base_image(const char *name, void *buf, size_t len) { ssize_t ret; - char mem_path[PATH_MAX - 1]; + char mem_path[PATH_MAX]; int fdmem; snprintf(mem_path, sizeof(mem_path), @@ -61,7 +61,7 @@ main(int argc, char *argv[]) size_t len = 0; int fd; char *prog = *argv; - char mdiff_path[PATH_MAX - 1]; + char mdiff_path[PATH_MAX]; bool once = false; uint64_t cycle = 0; char *symbol = NULL, *tmp;