]> granicus.if.org Git - strace/blobdiff - io.c
Refactor tamper_with_syscall_exiting()
[strace] / io.c
diff --git a/io.c b/io.c
index ba3ed4d5b579373dccc65cb13593331c3a75014a..cd803057b32131931eab75decbcb7ae9809f2a61 100644 (file)
--- a/io.c
+++ b/io.c
@@ -3,7 +3,7 @@
  * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
  * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
- * Copyright (c) 1999-2017 The strace developers.
+ * Copyright (c) 1999-2018 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -70,7 +70,7 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
        kernel_ulong_t iov_buf[2], len;
        struct print_iovec_config *c = data;
 
-        if (elem_size < sizeof(iov_buf)) {
+       if (elem_size < sizeof(iov_buf)) {
                iov_buf[0] = ((unsigned int *) elem_buf)[0];
                iov_buf[1] = ((unsigned int *) elem_buf)[1];
                iov = iov_buf;
@@ -118,11 +118,12 @@ tprint_iov_upto(struct tcb *const tcp, const kernel_ulong_t len,
                const kernel_ulong_t data_size)
 {
        kernel_ulong_t iov[2];
-       struct print_iovec_config config =
-               { .decode_iov = decode_iov, .data_size = data_size };
+       struct print_iovec_config config = {
+               .decode_iov = decode_iov, .data_size = data_size
+       };
 
        print_array(tcp, addr, len, iov, current_wordsize * 2,
-                   umoven_or_printaddr_ignore_syserror, print_iovec, &config);
+                   tfetch_mem_ignore_syserror, print_iovec, &config);
 }
 
 SYS_FUNC(readv)