[systemd-commits] src/core
Daniel Mack
zonque at kemper.freedesktop.org
Thu Feb 20 04:32:43 PST 2014
src/core/unit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit db57f3c6d11864f4227bb6734a0d509695a32a7d
Author: Daniel Mack <zonque at gmail.com>
Date: Thu Feb 20 13:29:54 2014 +0100
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.
diff --git a/src/core/unit.c b/src/core/unit.c
index 21ad434..016b1e3 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);
More information about the systemd-commits
mailing list