summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-03-08 11:57:28 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-03-08 11:58:56 -0500
commit58b129170ca6acacffd853b6c8fbec9fce2c2163 (patch)
tree787882d4bcb894fdeb70ce0332ddd8aa1fa3cfae /src/network
parentb629d0984206ad855cc0cb7e6a376c919f7bf366 (diff)
networkd: fix confusion from missing braces
Fixup for 76800848f281c3 'networkd: link - degrade failed UP to warning'.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 9fb8d9f1fc..a97e3473ec 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1056,16 +1056,14 @@ static int link_up_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
return 1;
r = sd_rtnl_message_get_errno(m);
- if (r < 0)
+ if (r >= 0)
+ link_update_flags(link, link->flags | IFF_UP);
+ else
log_struct_link(LOG_WARNING, link,
"MESSAGE=%s: could not bring up interface: %s",
link->ifname, strerror(-r),
"ERRNO=%d", -r,
NULL);
- return 1;
-
- link_update_flags(link, link->flags | IFF_UP);
-
return 1;
}