From: Eugene Syromyatnikov Date: Mon, 7 May 2018 06:26:29 +0000 (+0200) Subject: Avoid using print_array as a local variable name X-Git-Tag: v4.23~161 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e0abf45e436973a7d89bd136e427b58021c359c;p=strace Avoid using print_array as a local variable name We have a function with the same name. * netlink.c (decode_netlink) : Rename to is_array, all users updated. * nlattr.c (decode_nlattr) : Likewise. Co-Authored-by: Dmitry V. Levin --- diff --git a/netlink.c b/netlink.c index bcf4bc11..d14ce22e 100644 --- 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("]"); } } diff --git a/nlattr.c b/nlattr.c index d05f7b44..873457ca 100644 --- 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("]"); } }