chiark / gitweb /
journald: log when we fail to forward messages to syslog
[elogind.git] / src / core / unit.c
index c9cd9ee2a0142b19d2e4d11e3ed6a2da28ae50a0..be0d654bbc001bcfb94c9750c0700bece380236d 100644 (file)
@@ -1327,7 +1327,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
         /* Note that this is called for all low-level state changes,
          * even if they might map to the same high-level
          * UnitActiveState! That means that ns == os is OK an expected
-         * behaviour here. For example: if a mount point is remounted
+         * behavior here. For example: if a mount point is remounted
          * this function will be called too! */
 
         if (u->manager->n_reloading <= 0) {
@@ -2675,16 +2675,18 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
 
         r = manager_load_unit(u->manager, e, NULL, NULL, &device);
         free(e);
-
         if (r < 0)
                 return r;
 
-        if ((r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BINDS_TO, device, true)) < 0)
+        r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BINDS_TO, device, true);
+        if (r < 0)
                 return r;
 
-        if (wants)
-                if ((r = unit_add_dependency(device, UNIT_WANTS, u, false)) < 0)
+        if (wants) {
+                r = unit_add_dependency(device, UNIT_WANTS, u, false);
+                if (r < 0)
                         return r;
+        }
 
         return 0;
 }