From 225ce48b8ad37029cee0bddac4575e44755ccfb7 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 10 Jan 2016 12:52:10 +0100 Subject: [PATCH] device/vlan: remove unreachable code from realize() plnk->id is unsigned. It cannot be negative. --- src/devices/nm-device-vlan.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index 47047b1999..a6bb8123da 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -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