]> git.baikalelectronics.ru Git - kernel.git/commit
net: Avoid unnecessary inet_addr_type() call when addr is INADDR_ANY
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 25 Aug 2020 11:40:48 +0000 (07:40 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Aug 2020 13:20:10 +0000 (06:20 -0700)
commit7d8c260a45739b881778c06f0aff7a8504b96f14
treeca9c4fb10d74c4346125d91877a6c843bb526724
parent98f43a2dfd1f4fd2471d60bae8f47125a71a6279
net: Avoid unnecessary inet_addr_type() call when addr is INADDR_ANY

We can avoid unnecessary inet_addr_type() call by check addr against
INADDR_ANY first.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ping.c