diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-06-11 11:52:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-06-11 11:52:58 +0200 |
commit | 64b8c0d030263fc37003f8655b53523231ec81d2 (patch) | |
tree | 2655aa30e1645a41d8843f1005adff7e9cb8e07c /src | |
parent | 814acddde14d2053d715221590298db6531676e4 (diff) | |
parent | 3de1c8ceabfc170a38798476ff378e2fbc06dbad (diff) |
Merge pull request #158 from ssahani/net
Net
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-network/sd-network.c | 4 | ||||
-rw-r--r-- | src/network/networkd-netdev-ipvlan.c | 10 | ||||
-rw-r--r-- | src/network/networkd-netdev-macvlan.c | 10 |
3 files changed, 7 insertions, 17 deletions
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c index 207eda163b..b63fdf8fcb 100644 --- a/src/libsystemd/sd-network/sd-network.c +++ b/src/libsystemd/sd-network/sd-network.c @@ -338,10 +338,8 @@ _public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category good = true; } - if (!good) { - close_nointr(fd); + if (!good) return -EINVAL; - } *m = FD_TO_MONITOR(fd); fd = -1; diff --git a/src/network/networkd-netdev-ipvlan.c b/src/network/networkd-netdev-ipvlan.c index 5189000c1f..f1c8e0ccdb 100644 --- a/src/network/networkd-netdev-ipvlan.c +++ b/src/network/networkd-netdev-ipvlan.c @@ -42,13 +42,9 @@ static int netdev_ipvlan_fill_message_create(NetDev *netdev, Link *link, sd_rtnl assert(netdev->ifname); if (m->mode != _NETDEV_IPVLAN_MODE_INVALID) { - r = sd_rtnl_message_append_u16(req, IFLA_IPVLAN_MODE, m->mode); - if (r < 0) { - log_netdev_error(netdev, - "Could not append IFLA_IPVLAN_MODE attribute: %s", - strerror(-r)); - return r; - } + r = sd_rtnl_message_append_u16(req, IFLA_IPVLAN_MODE, m->mode); + if (r < 0) + return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPVLAN_MODE attribute: %m"); } return 0; diff --git a/src/network/networkd-netdev-macvlan.c b/src/network/networkd-netdev-macvlan.c index 5f41f1c865..a8bf6e6bb7 100644 --- a/src/network/networkd-netdev-macvlan.c +++ b/src/network/networkd-netdev-macvlan.c @@ -44,13 +44,9 @@ static int netdev_macvlan_fill_message_create(NetDev *netdev, Link *link, sd_rtn assert(netdev->ifname); if (m->mode != _NETDEV_MACVLAN_MODE_INVALID) { - r = sd_rtnl_message_append_u32(req, IFLA_MACVLAN_MODE, m->mode); - if (r < 0) { - log_netdev_error(netdev, - "Could not append IFLA_MACVLAN_MODE attribute: %s", - strerror(-r)); - return r; - } + r = sd_rtnl_message_append_u32(req, IFLA_MACVLAN_MODE, m->mode); + if (r < 0) + return log_netdev_error_errno(netdev, r, "Could not append IFLA_MACVLAN_MODE attribute: %m"); } return 0; |