]> granicus.if.org Git - strace/blobdiff - netlink.c
print_array: enhance printing of unfetchable object addresses
[strace] / netlink.c
index bcf4bc11a6588bd6d528ab3529f9663dd988cd46..ba05edcf5b586aa5c10c2ba9063e8b7a6f47dc7f 100644 (file)
--- a/netlink.c
+++ b/netlink.c
@@ -473,7 +473,7 @@ decode_nlmsgerr_attr_cookie(struct tcb *const tcp,
        const size_t nmemb = len / sizeof(cookie);
 
        print_array(tcp, addr, nmemb, &cookie, sizeof(cookie),
-                   umoven_or_printaddr, print_cookie, 0);
+                   tfetch_mem, print_cookie, 0);
 
        return true;
 }
@@ -636,7 +636,7 @@ decode_netlink(struct tcb *const tcp,
        }
 
        struct nlmsghdr nlmsghdr;
-       bool print_array = false;
+       bool is_array = false;
        unsigned int elt;
 
        for (elt = 0; fetch_nlmsghdr(tcp, &nlmsghdr, addr, len); elt++) {
@@ -656,9 +656,9 @@ decode_netlink(struct tcb *const tcp,
                                next_addr = addr + nlmsg_len;
                }
 
-               if (!print_array && next_addr) {
+               if (!is_array && next_addr) {
                        tprints("[");
-                       print_array = true;
+                       is_array = true;
                }
 
                decode_nlmsghdr_with_payload(tcp, fd, family,
@@ -672,7 +672,7 @@ decode_netlink(struct tcb *const tcp,
                len = next_len;
        }
 
-       if (print_array) {
+       if (is_array) {
                tprints("]");
        }
 }