From: JingPiao Chen Date: Wed, 5 Jul 2017 13:25:13 +0000 (+0800) Subject: tests: introduce TEST_NLATTR_nla macro in test_nlattr.h X-Git-Tag: v4.19~310 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d300638360eb1e0421b7eabd4dc00df4bd84559;p=strace tests: introduce TEST_NLATTR_nla macro in test_nlattr.h 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. --- diff --git a/tests/test_nlattr.h b/tests/test_nlattr.h index 24aeb607..fd8e036c 100644 --- a/tests/test_nlattr.h +++ b/tests/test_nlattr.h @@ -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 = \