summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index c0cbbe0647..53516638dc 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -194,10 +194,8 @@ static int list_links(char **args, unsigned n) {
return log_error_errno(r, "Failed to connect to netlink: %m");
udev = udev_new();
- if (!udev) {
- log_error_errno(errno, "Failed to connect to udev: %m");
- return -errno;
- }
+ if (!udev)
+ return log_error_errno(errno, "Failed to connect to udev: %m");
r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, 0);
if (r < 0)
@@ -445,10 +443,8 @@ static int link_status(char **args, unsigned n) {
return log_error_errno(r, "Failed to connect to netlink: %m");
udev = udev_new();
- if (!udev) {
- log_error_errno(errno, "Failed to connect to udev: %m");
- return -errno;
- }
+ if (!udev)
+ return log_error_errno(errno, "Failed to connect to udev: %m");
if (n <= 1 && !arg_all) {
_cleanup_free_ char *operational_state = NULL;