[systemd-commits] src/network
Tom Gundersen
tomegun at kemper.freedesktop.org
Mon Jul 7 12:51:27 PDT 2014
src/network/networkd-veth.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit 948a6f8eb42c85d2b96e9b5817fcfa29ad4752ae
Author: Susant Sahani <susant at redhat.com>
Date: Mon Jul 7 22:07:39 2014 +0530
networkd veth: Make kind assert
It's more appropriate to make it's assert than -ENOTSUP
diff --git a/src/network/networkd-veth.c b/src/network/networkd-veth.c
index 3eac90b..50a5b67 100644
--- a/src/network/networkd-veth.c
+++ b/src/network/networkd-veth.c
@@ -122,6 +122,7 @@ int netdev_create_veth(NetDev *netdev, sd_rtnl_message_handler_t callback) {
assert(netdev->ifname);
assert(netdev->manager);
assert(netdev->manager->rtnl);
+ assert(netdev->kind == NETDEV_KIND_VETH);
r = sd_rtnl_message_new_link(netdev->manager->rtnl, &m, RTM_NEWLINK, 0);
if (r < 0) {
@@ -131,9 +132,6 @@ int netdev_create_veth(NetDev *netdev, sd_rtnl_message_handler_t callback) {
return r;
}
- if(netdev->kind != NETDEV_KIND_VETH)
- return -ENOTSUP;
-
r = netdev_fill_veth_rtnl_message(netdev, m);
if(r < 0)
return r;
More information about the systemd-commits
mailing list