mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 09:20:32 +01:00
device/vlan: remove unreachable code from realize()
plnk->id is unsigned. It cannot be negative.
This commit is contained in:
parent
492691dfb2
commit
225ce48b8a
1 changed files with 1 additions and 7 deletions
|
|
@ -183,18 +183,12 @@ realize (NMDevice *device,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (plnk->id < 0) {
|
||||
g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
|
||||
"(%s): VLAN ID invalid", plink->name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (plink->parent != NM_PLATFORM_LINK_OTHER_NETNS) {
|
||||
parent = nm_manager_get_device_by_ifindex (nm_manager_get (), plink->parent);
|
||||
if (!parent) {
|
||||
nm_log_dbg (LOGD_HW, "(%s): VLAN parent interface unknown", plink->name);
|
||||
g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
|
||||
"(%s): VLAN parent interface unknown", plink->name);
|
||||
"(%s): VLAN parent interface unknown", plink->name);
|
||||
return FALSE;
|
||||
}
|
||||
} else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue