diff options
-rw-r--r-- | include/linux/netlink.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 9ff1b54908f3..51b09a1f46c3 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -242,7 +242,8 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) | |||
242 | nlh->nlmsg_flags = flags; | 242 | nlh->nlmsg_flags = flags; |
243 | nlh->nlmsg_pid = pid; | 243 | nlh->nlmsg_pid = pid; |
244 | nlh->nlmsg_seq = seq; | 244 | nlh->nlmsg_seq = seq; |
245 | memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size); | 245 | if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0) |
246 | memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size); | ||
246 | return nlh; | 247 | return nlh; |
247 | } | 248 | } |
248 | 249 | ||