]> granicus.if.org Git - strace/blobdiff - upeek.c
Simplify print_lld_from_low_high_val ifdefery
[strace] / upeek.c
diff --git a/upeek.c b/upeek.c
index f4f20bb9631ec8fb459b5b8996fad6c655293320..01a12d3538b830ae7b27c2cc458d5c110e422944 100644 (file)
--- a/upeek.c
+++ b/upeek.c
 #include "ptrace.h"
 
 int
-upeek(int pid, long off, long *res)
+upeek(int pid, unsigned long off, kernel_ulong_t *res)
 {
        long val;
 
        errno = 0;
-       val = ptrace(PTRACE_PEEKUSER, (pid_t)pid, (char *) off, 0);
+       val = ptrace(PTRACE_PEEKUSER, (pid_t) pid, (void *) off, 0);
        if (val == -1 && errno) {
                if (errno != ESRCH) {
                        perror_msg("upeek: PTRACE_PEEKUSER pid:%d @0x%lx)", pid, off);
                }
                return -1;
        }
-       *res = val;
+       *res = (unsigned long) val;
        return 0;
 }