summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-01-10 12:52:10 +0100
committerThomas Haller <thaller@redhat.com>2016-01-11 12:22:19 +0100
commitd7a25a9aae87897e620b8edf9ba4718cf6d11c62 (patch)
treef3250b4228635c702df4f65f2232fbd17327ab49
parentcdd6eb7e8e5ec91078967616075eb45eaa0274ca (diff)
downloadNetworkManager-d7a25a9aae87897e620b8edf9ba4718cf6d11c62.tar.gz
device/vlan: remove unreachable code from realize()
plnk->id is unsigned. It cannot be negative.
-rw-r--r--src/devices/nm-device-vlan.c8
1 files changed, 1 insertions, 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