More clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msg

This commit is contained in:
Коренберг Марк 2012-08-30 18:40:11 +06:00
parent 3bf8712feb
commit 8f2ce4d791

View file

@ -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)