netlink: Remove redundant check on nlmsg_type
In the loop within nl_addr_dup() we check and skip for any messages that aren't of type RTM_NEWADDR. This is a leftover that was missed in the recent big netlink cleanup. In fact we already check for the message type in the nl_foreach_oftype() macro, so the explicit test is redudant. Remove it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
5ed4e034b2
commit
4b9f4c2513
1 changed files with 0 additions and 3 deletions
|
@ -669,9 +669,6 @@ int nl_addr_dup(int s_src, unsigned int ifi_src,
|
||||||
struct rtattr *rta;
|
struct rtattr *rta;
|
||||||
size_t na;
|
size_t na;
|
||||||
|
|
||||||
if (nh->nlmsg_type != RTM_NEWADDR)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
ifa = (struct ifaddrmsg *)NLMSG_DATA(nh);
|
ifa = (struct ifaddrmsg *)NLMSG_DATA(nh);
|
||||||
|
|
||||||
if (rc < 0 || ifa->ifa_scope == RT_SCOPE_LINK ||
|
if (rc < 0 || ifa->ifa_scope == RT_SCOPE_LINK ||
|
||||||
|
|
Loading…
Reference in a new issue