]> granicus.if.org Git - strace/commitdiff
tests: introduce TEST_NLATTR_nla macro in test_nlattr.h
authorJingPiao Chen <chenjingpiao@gmail.com>
Wed, 5 Jul 2017 13:25:13 +0000 (21:25 +0800)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 9 Jul 2017 00:06:29 +0000 (00:06 +0000)
Explicitly make struct nlattr * pointer which is internal
to TEST_NLATTR_ macro available to its varadic arguments.

* tests/test_nlattr.h (TEST_NLATTR_): Rename nla to TEST_NLATTR_nla.

tests/test_nlattr.h

index 24aeb607f06f605e6a24e208d714a7c9f0b7bb5f..fd8e036ccef2956602df888b676fdffea032af44 100644 (file)
@@ -62,14 +62,15 @@ print_nlattr(const unsigned int nla_len, const char *const nla_type)
        do {                                                            \
                struct nlmsghdr *const nlh =                            \
                        (nlh0_) - (NLA_HDRLEN + (slen_));               \
-               struct nlattr *const nla = NLMSG_ATTR(nlh, (hdrlen_));  \
+               struct nlattr *const TEST_NLATTR_nla =                  \
+                       NLMSG_ATTR(nlh, (hdrlen_));                     \
                const unsigned int nla_len =                            \
                        NLA_HDRLEN + (nla_data_len_);                   \
                const unsigned int msg_len =                            \
                        NLMSG_SPACE(hdrlen_) + nla_len;                 \
                                                                        \
                (init_msg_)(nlh, msg_len);                              \
-               init_nlattr(nla, nla_len, (nla_type_),                  \
+               init_nlattr(TEST_NLATTR_nla, nla_len, (nla_type_),      \
                           (src_), (slen_));                            \
                                                                        \
                const char *const errstr =                              \