diff options
author | Daniel Mack <zonque@gmail.com> | 2014-02-20 13:29:54 +0100 |
---|---|---|
committer | Daniel Mack <zonque@gmail.com> | 2014-02-20 13:29:54 +0100 |
commit | db57f3c6d11864f4227bb6734a0d509695a32a7d (patch) | |
tree | 97f74cdae96e2ff97500ae12db4bb107b4a9ad21 | |
parent | 6300b3eca9e5261b73bd7f1bb9735992b127cd80 (diff) |
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.
-rw-r--r-- | src/core/unit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 21ad434f9d..016b1e3d86 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -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); |