summaryrefslogtreecommitdiffstats
path: root/lib/msg.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-11 10:48:16 (GMT)
committerThomas Haller <thaller@redhat.com>2018-04-11 10:48:44 (GMT)
commitbb446bc1164ebc6056097a79a96b532845e268c8 (patch)
tree5e62775f35e7c3841edcedd181ffaf18eaa4cad2 /lib/msg.c
parentdc61768ec6e392543113863517a74858a74212ab (diff)
downloadlibnl-bb446bc1164ebc6056097a79a96b532845e268c8.zip
libnl-bb446bc1164ebc6056097a79a96b532845e268c8.tar.gz
libnl-bb446bc1164ebc6056097a79a96b532845e268c8.tar.bz2
nl-msg: explicitly initialize nlmsg_seq and nlmsg_pid field in nlmsg_alloc_simple()
This is no change in behavior, because the NL_AUTO_* macros are both zero.
Diffstat (limited to 'lib/msg.c')
-rw-r--r--lib/msg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/msg.c b/lib/msg.c
index 0a52340..4fbd2ca 100644
--- a/lib/msg.c
+++ b/lib/msg.c
@@ -350,6 +350,8 @@ struct nl_msg *nlmsg_alloc_simple(int nlmsgtype, int flags)
struct nlmsghdr nlh = {
.nlmsg_type = nlmsgtype,
.nlmsg_flags = flags,
+ .nlmsg_seq = NL_AUTO_SEQ,
+ .nlmsg_pid = NL_AUTO_PID,
};
msg = nlmsg_inherit(&nlh);