diff options
Diffstat (limited to 'src/core/scope.c')
-rw-r--r-- | src/core/scope.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/scope.c b/src/core/scope.c index 8d6149aab0..5f6527c155 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -122,6 +122,9 @@ static int scope_add_default_dependencies(Scope *s) { assert(s); + if (!UNIT(s)->default_dependencies) + return 0; + /* Make sure scopes are unloaded on shutdown */ r = unit_add_two_dependencies_by_name( UNIT(s), @@ -173,11 +176,9 @@ static int scope_load(Unit *u) { if (r < 0) return r; - if (u->default_dependencies) { - r = scope_add_default_dependencies(s); - if (r < 0) - return r; - } + r = scope_add_default_dependencies(s); + if (r < 0) + return r; return scope_verify(s); } |