mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-02 11:58:06 +02:00
platform: remove unreachable code from nmp_cache_lookup_link_full()
If @ifname is set, we above lookup by name (nmp_lookup_init_link_by_ifname) and set ifname to NULL. Hence, inside the loop, the check for ifname is never true.
This commit is contained in:
parent
89a9908abf
commit
f088afe7e9
1 changed files with 0 additions and 3 deletions
|
|
@ -1709,7 +1709,6 @@ nmp_cache_lookup_link_full (const NMPCache *cache,
|
|||
if (strlen (ifname) >= IFNAMSIZ)
|
||||
return NULL;
|
||||
nmp_lookup_init_link_by_ifname (&lookup, ifname);
|
||||
ifname = NULL;
|
||||
} else
|
||||
nmp_lookup_init_obj_type (&lookup, NMP_OBJECT_TYPE_LINK);
|
||||
|
||||
|
|
@ -1721,8 +1720,6 @@ nmp_cache_lookup_link_full (const NMPCache *cache,
|
|||
continue;
|
||||
if (link_type != NM_LINK_TYPE_NONE && obj->link.type != link_type)
|
||||
continue;
|
||||
if (ifname && strcmp (ifname, obj->link.name))
|
||||
continue;
|
||||
if (match_fn && !match_fn (obj, user_data))
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue