mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
core/unit: fix unit_add_target_dependencies() for units with no dependencies
For units without any dependencies, r needs to be initialized to 0. Otherwise, the return value of unit_add_target_dependencies() is unspecified.
This commit is contained in:
parent
6300b3eca9
commit
db57f3c6d1
Notes:
Lennart Poettering
2014-02-24 03:45:25 +01:00
Backport: bugfix
@ -959,7 +959,7 @@ static int unit_add_target_dependencies(Unit *u) {
|
||||
Unit *target;
|
||||
Iterator i;
|
||||
unsigned k;
|
||||
int r;
|
||||
int r = 0;
|
||||
|
||||
assert(u);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user