From: Коренберг Марк Date: Thu, 30 Aug 2012 12:40:11 +0000 (+0600) Subject: More clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msg X-Git-Tag: libnl3_2_13~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f2ce4d791ebdbfcb3699f8890568964c5572a70;p=libnl More clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msg --- diff --git a/lib/nl.c b/lib/nl.c index d3e67aa..ea3e087 100644 --- a/lib/nl.c +++ b/lib/nl.c @@ -274,10 +274,10 @@ void nl_complete_msg(struct nl_sock *sk, struct nl_msg *msg) struct nlmsghdr *nlh; nlh = nlmsg_hdr(msg); - if (nlh->nlmsg_pid == 0) + if (nlh->nlmsg_pid == NL_AUTO_PORT) nlh->nlmsg_pid = sk->s_local.nl_pid; - if (nlh->nlmsg_seq == 0) + if (nlh->nlmsg_seq == NL_AUTO_SEQ) nlh->nlmsg_seq = sk->s_seq_next++; if (msg->nm_protocol == -1)