]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: drop "return 1" when the return value is ignored by all callers 12407/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 25 Apr 2019 08:41:59 +0000 (10:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 25 Apr 2019 09:13:39 +0000 (11:13 +0200)
The reader is tricked into thinking that this has some meaning...

src/network/networkd-link.c

index d3928e2862f3a034a4f8a7c1a9a51c3922ce7d6b..ec2190fd13c796d6f3b563f0f6551ed5b1102056 100644 (file)
@@ -3365,7 +3365,7 @@ static int link_initialized_and_synced(Link *link) {
         /* We may get called either from the asynchronous netlink callback,
          * or directly for link_add() if running in a container. See link_add(). */
         if (!IN_SET(link->state, LINK_STATE_PENDING, LINK_STATE_INITIALIZED))
-                return 1;
+                return 0;
 
         log_link_debug(link, "Link state is up-to-date");
         link_set_state(link, LINK_STATE_INITIALIZED);
@@ -3383,7 +3383,7 @@ static int link_initialized_and_synced(Link *link) {
                                 &link->mac, &network);
                 if (r == -ENOENT) {
                         link_enter_unmanaged(link);
-                        return 1;
+                        return 0;
                 } else if (r == 0 && network->unmanaged) {
                         link_enter_unmanaged(link);
                         return 0;
@@ -3420,7 +3420,7 @@ static int link_initialized_and_synced(Link *link) {
         if (r < 0)
                 return r;
 
-        return 1;
+        return 0;
 }
 
 static int link_initialized_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {