summaryrefslogtreecommitdiff
path: root/netlink_smc_diag.c
diff options
context:
space:
mode:
authorJingPiao Chen <chenjingpiao@gmail.com>2017-07-19 22:55:53 +0800
committerDmitry V. Levin <ldv@altlinux.org>2017-07-22 15:31:09 +0000
commitd6a94e0bcdaef4b60d3c5f8e296154a7d0970c64 (patch)
tree9550a81215efffd4d435f8fac3a8df8664763371 /netlink_smc_diag.c
parent184b09d450f2918211891c210669b5915cb45bc1 (diff)
downloadstrace-d6a94e0bcdaef4b60d3c5f8e296154a7d0970c64.tar.gz
netlink_sock_diag: replace NLA_ALIGN with NLMSG_ALIGN
In several netlink_sock_diag parsers NLA_ALIGN was used instead of NLMSG_ALIGN to align the length of netlink messages. Fortunately, both macros round the given length to the closest multiple of 4, so technically there is no difference, but the use of wrong macro is misleading. * netlink_inet_diag.c (decode_inet_diag_req_compat, decode_inet_diag_req_v2, decode_inet_diag_msg): Replace NLA_ALIGN with NLMSG_ALIGN. * netlink_netlink_diag.c (decode_netlink_diag_msg): Likewise. * netlink_packet_diag.c (decode_packet_diag_msg): Likewise. * netlink_smc_diag.c (decode_smc_diag_msg): Likewise.
Diffstat (limited to 'netlink_smc_diag.c')
-rw-r--r--netlink_smc_diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/netlink_smc_diag.c b/netlink_smc_diag.c
index 2cd07ee00..53ae27ba8 100644
--- a/netlink_smc_diag.c
+++ b/netlink_smc_diag.c
@@ -177,7 +177,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_msg)
tprints("...");
tprints("}");
- offset = NLA_ALIGN(sizeof(msg));
+ offset = NLMSG_ALIGN(sizeof(msg));
if (decode_nla && len > offset) {
tprints(", ");
decode_nlattr(tcp, addr + offset, len - offset,