]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/target.c
Merge pull request #17732 from yuwata/core-use-synthetic_errno
[thirdparty/systemd.git] / src / core / target.c
index a1d1cfc38aff46b5be66410ab23d0fa2a2909b5f..a422056803da68786c83a8534f67ad1ae4e35bbf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dbus-target.h"
 #include "dbus-unit.h"
@@ -57,10 +57,9 @@ static int target_add_default_dependencies(Target *t) {
 
         for (k = 0; k < ELEMENTSOF(deps); k++) {
                 Unit *other;
-                Iterator i;
                 void *v;
 
-                HASHMAP_FOREACH_KEY(v, other, UNIT(t)->dependencies[deps[k]], i) {
+                HASHMAP_FOREACH_KEY(v, other, UNIT(t)->dependencies[deps[k]]) {
                         r = unit_add_default_target_dependency(other, UNIT(t));
                         if (r < 0)
                                 return r;
@@ -193,6 +192,8 @@ const UnitVTable target_vtable = {
                 "Target\0"
                 "Install\0",
 
+        .can_fail = true,
+
         .load = target_load,
         .coldplug = target_coldplug,