chiark / gitweb /
clang: fix numerous little issues found with clang-analyzer
[elogind.git] / src / automount.c
index 3a69cf9b4c873b9074a6ecab3351028b4a81455a..047af7759bbd3f706bf7a15a5bdb6f1498c8a9fd 100644 (file)
@@ -153,10 +153,10 @@ static int automount_add_default_dependencies(Automount *a) {
 
         if (a->meta.manager->running_as == MANAGER_SYSTEM) {
 
-                if ((r = unit_add_dependency_by_name(UNIT(a), UNIT_AFTER, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
+                if ((r = unit_add_dependency_by_name(UNIT(a), UNIT_AFTER, SPECIAL_FSCK_TARGET, NULL, true)) < 0)
                         return r;
 
-                if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
+                if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
                         return r;
         }
 
@@ -444,6 +444,8 @@ int automount_send_ready(Automount *a, int status) {
         else
                 log_debug("Sending success.");
 
+        r = 0;
+
         /* Autofs thankfully does not hand out 0 as a token */
         while ((token = PTR_TO_UINT(set_steal_first(a->tokens)))) {
                 int k;
@@ -460,8 +462,6 @@ int automount_send_ready(Automount *a, int status) {
                         r = k;
         }
 
-        r = 0;
-
 fail:
         if (ioctl_fd >= 0)
                 close_nointr_nofail(ioctl_fd);