mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
net-next: replace obsolete NLMSG_* with type safe nlmsg_*
Signed-off-by: Hong Zhiguo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e5c5d22e8d
commit
573ce260b3
18 changed files with 48 additions and 50 deletions
|
|
@ -1646,7 +1646,7 @@ struct nlmsghdr *
|
|||
__nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags)
|
||||
{
|
||||
struct nlmsghdr *nlh;
|
||||
int size = NLMSG_LENGTH(len);
|
||||
int size = nlmsg_msg_size(len);
|
||||
|
||||
nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size));
|
||||
nlh->nlmsg_type = type;
|
||||
|
|
@ -1655,7 +1655,7 @@ __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int fla
|
|||
nlh->nlmsg_pid = portid;
|
||||
nlh->nlmsg_seq = seq;
|
||||
if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0)
|
||||
memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size);
|
||||
memset(nlmsg_data(nlh) + len, 0, NLMSG_ALIGN(size) - size);
|
||||
return nlh;
|
||||
}
|
||||
EXPORT_SYMBOL(__nlmsg_put);
|
||||
|
|
|
|||
Loading…
Reference in a new issue