]> granicus.if.org Git - strace/commitdiff
Avoid using print_array as a local variable name
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 7 May 2018 06:26:29 +0000 (08:26 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 15 May 2018 13:30:16 +0000 (13:30 +0000)
We have a function with the same name.

* netlink.c (decode_netlink) <print_array>: Rename to is_array, all
users updated.
* nlattr.c (decode_nlattr) <print_array>: Likewise.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
netlink.c
nlattr.c

index bcf4bc11a6588bd6d528ab3529f9663dd988cd46..d14ce22e4077b02db44ef1666568fe51014187cf 100644 (file)
--- a/netlink.c
+++ b/netlink.c
@@ -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("]");
        }
 }
index d05f7b44867c64348fcfbf79d7e42a5cbf258867..873457ca17a6e3ccbf700bd2018882d2a30e8153 100644 (file)
--- a/nlattr.c
+++ b/nlattr.c
@@ -115,7 +115,7 @@ decode_nlattr(struct tcb *const tcp,
              const void *const opaque_data)
 {
        struct nlattr nla;
-       bool print_array = false;
+       bool is_array = false;
        unsigned int elt;
 
        for (elt = 0; fetch_nlattr(tcp, &nla, addr, len); elt++) {
@@ -135,9 +135,9 @@ decode_nlattr(struct tcb *const tcp,
                                next_addr = addr + nla_len;
                }
 
-               if (!print_array && next_addr) {
+               if (!is_array && next_addr) {
                        tprints("[");
-                       print_array = true;
+                       is_array = true;
                }
 
                decode_nlattr_with_data(tcp, &nla, addr, len, table, dflt,
@@ -151,7 +151,7 @@ decode_nlattr(struct tcb *const tcp,
                len = next_len;
        }
 
-       if (print_array) {
+       if (is_array) {
                tprints("]");
        }
 }