aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorHong zhi guo <honkiko@gmail.com>2013-03-27 02:47:04 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-28 14:25:25 -0400
commit573ce260b385a4d14a1ef046558fad9f1daeee42 (patch)
treeb577de870934c583a66514b1206964fbd262c340 /net/netlink
parente5c5d22e8dcf7c2d430336cbf8e180bd38e8daf1 (diff)
net-next: replace obsolete NLMSG_* with type safe nlmsg_*
Signed-off-by: Hong Zhiguo <honkiko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index a500ce201438..ce2e0064e7f6 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1646,7 +1646,7 @@ struct nlmsghdr *
1646__nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags) 1646__nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags)
1647{ 1647{
1648 struct nlmsghdr *nlh; 1648 struct nlmsghdr *nlh;
1649 int size = NLMSG_LENGTH(len); 1649 int size = nlmsg_msg_size(len);
1650 1650
1651 nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size)); 1651 nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size));
1652 nlh->nlmsg_type = type; 1652 nlh->nlmsg_type = type;
@@ -1655,7 +1655,7 @@ __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int fla
1655 nlh->nlmsg_pid = portid; 1655 nlh->nlmsg_pid = portid;
1656 nlh->nlmsg_seq = seq; 1656 nlh->nlmsg_seq = seq;
1657 if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0) 1657 if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0)
1658 memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size); 1658 memset(nlmsg_data(nlh) + len, 0, NLMSG_ALIGN(size) - size);
1659 return nlh; 1659 return nlh;
1660} 1660}
1661EXPORT_SYMBOL(__nlmsg_put); 1661EXPORT_SYMBOL(__nlmsg_put);