]> granicus.if.org Git - strace/commitdiff
printstr*: change address argument type from long to kernel_ureg_t
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 20 Dec 2016 21:59:24 +0000 (21:59 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 11:32:43 +0000 (11:32 +0000)
* defs.h (printstr_ex, printstr_ex): Change address argument type
from long to kernel_ureg_t.
* util.c (printstr_ex): Likewise.

defs.h
util.c

diff --git a/defs.h b/defs.h
index ea14b007b0b49e61a6a4615b0c01265924ed1feb..a4e8b67247969a12221af895df25e3ac147a6091 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -603,8 +603,10 @@ extern void dumpiov_in_msghdr(struct tcb *, long, unsigned long);
 extern void dumpiov_in_mmsghdr(struct tcb *, long);
 extern void dumpiov_upto(struct tcb *, int, long, unsigned long);
 extern void dumpstr(struct tcb *, long, int);
-extern void printstr_ex(struct tcb *, long addr, long len,
-       unsigned int user_style);
+
+extern void
+printstr_ex(struct tcb *, kernel_ureg_t addr, long len,
+           unsigned int user_style);
 
 #define DECL_PRINTNUM(name)                                            \
 extern bool                                                            \
@@ -739,7 +741,7 @@ printaddr(kernel_ureg_t addr)
 }
 
 static inline void
-printstr(struct tcb *tcp, long addr, long len)
+printstr(struct tcb *tcp, kernel_ureg_t addr, long len)
 {
        printstr_ex(tcp, addr, len, 0);
 }
diff --git a/util.c b/util.c
index 02bb3bc1fcee31c13895f498919dc94a76ee47d8..537e796cb851a9c769e9dcd7bf1933294d00236f 100644 (file)
--- a/util.c
+++ b/util.c
@@ -856,7 +856,8 @@ printpath(struct tcb *tcp, long addr)
  * or `len' != -1 and the string length exceeds `len'.
  */
 void
-printstr_ex(struct tcb *tcp, long addr, long len, unsigned int user_style)
+printstr_ex(struct tcb *const tcp, const kernel_ureg_t addr, const long len,
+           const unsigned int user_style)
 {
        static char *str = NULL;
        static char *outstr;