diff options
author | Olaf Hering <olaf@aepfle.de> | 2013-11-08 16:15:16 (GMT) |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2013-11-08 16:15:16 (GMT) |
commit | 2d20d097e7cdec92232972825ab02e28113fefd5 (patch) | |
tree | 776e60e008dee31970865319f6281694efd1d771 /lib/msg.c | |
parent | 2ae5298408decbf7a036a54e6b8452b943dc2afd (diff) | |
download | libnl-2d20d097e7cdec92232972825ab02e28113fefd5.zip libnl-2d20d097e7cdec92232972825ab02e28113fefd5.tar.gz libnl-2d20d097e7cdec92232972825ab02e28113fefd5.tar.bz2 |
Remove extra memset from __nlmsg_alloc
A few lines above nm->nm_nlh is already allocated with calloc, the
allocated memory has at least sizeof(struct nlmsghdr).
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Diffstat (limited to 'lib/msg.c')
-rw-r--r-- | lib/msg.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -275,8 +275,6 @@ static struct nl_msg *__nlmsg_alloc(size_t len) if (!nm->nm_nlh) goto errout; - memset(nm->nm_nlh, 0, sizeof(struct nlmsghdr)); - nm->nm_protocol = -1; nm->nm_size = len; nm->nm_nlh->nlmsg_len = nlmsg_total_size(0); |