diff options
author | Yajun Deng <yajun.deng@linux.dev> | 2021-07-13 05:48:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-13 19:28:29 +0300 |
commit | 01757f536ac825e3614d583fee9acb48c64ed084 (patch) | |
tree | 0b31ad3ca2f4175b3c113a74c645a9cf28881548 /net/ipv4/inet_diag.c | |
parent | 71ce9d92fc7089f287c3e95a981bdec7545a8588 (diff) | |
download | linux-01757f536ac825e3614d583fee9acb48c64ed084.tar.xz |
net: Use nlmsg_unicast() instead of netlink_unicast()
It has 'if (err >0 )' statement in nlmsg_unicast(), so use nlmsg_unicast()
instead of netlink_unicast(), this looks more concise.
v2: remove the change in netfilter.
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r-- | net/ipv4/inet_diag.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index e65f4ef024a4..ef7897226f08 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -580,10 +580,7 @@ int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo, nlmsg_free(rep); goto out; } - err = netlink_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid, - MSG_DONTWAIT); - if (err > 0) - err = 0; + err = nlmsg_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid); out: if (sk) |