]> granicus.if.org Git - strace/commitdiff
Make tprint_iov function a static inline wrapper
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 19 Dec 2016 21:17:13 +0000 (21:17 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 20 Dec 2016 03:39:09 +0000 (03:39 +0000)
* io.c (tprint_iov): Move ...
* defs.h: ... here, add static inline keywords.

defs.h
io.c

diff --git a/defs.h b/defs.h
index acd9115a5199e8012cd5f462e9d7aa36edc63bff..06b1dcd3f2243869eede8e736b41356ea1d7e8f3 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -651,7 +651,6 @@ extern const char *sprintsigmask_n(const char *, const void *, unsigned int);
 #define tprintsigmask_addr(prefix, mask) \
        tprints(sprintsigmask_n((prefix), (mask), sizeof(mask)))
 extern void printsignal(int);
-extern void tprint_iov(struct tcb *, unsigned long, unsigned long, enum iov_decode);
 extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long,
                            enum iov_decode, unsigned long);
 extern void decode_netlink(struct tcb *, unsigned long, unsigned long);
@@ -748,6 +747,13 @@ printxval_long(const struct xlat *x, const unsigned long val, const char *dflt)
        return printxvals(val, dflt, x, NULL);
 }
 
+static inline void
+tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr,
+          enum iov_decode decode_iov)
+{
+       tprint_iov_upto(tcp, len, addr, decode_iov, -1UL);
+}
+
 #ifdef ALPHA
 typedef struct {
        int tv_sec, tv_usec;
diff --git a/io.c b/io.c
index 713a1ce4f8b708688d2fa706b36bf6901be25ec7..a93a56c87a6ed55b0ac73cb96091df510eca7bb1 100644 (file)
--- a/io.c
+++ b/io.c
@@ -122,13 +122,6 @@ tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr,
                    umoven_or_printaddr_ignore_syserror, print_iovec, &config);
 }
 
-void
-tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr,
-          enum iov_decode decode_iov)
-{
-       tprint_iov_upto(tcp, len, addr, decode_iov, -1UL);
-}
-
 SYS_FUNC(readv)
 {
        if (entering(tcp)) {