summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:57:32 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:57:32 +0100
commit4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f (patch)
treec7a6228e7151aa74bc8e331694a1e795226550cd /src/network
parent56f64d95763a799ba4475daf44d8e9f72a1bd474 (diff)
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
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;