summaryrefslogtreecommitdiff
path: root/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-03 14:21:48 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-03 14:21:48 +0100
commit47be870bd83fb3719dffc3ee9348a409ab762a14 (patch)
tree1d1ad244ffb51c901590ba320e8b458cad825021 /unit.c
parenta7334b0952ab66c17ee787e36e6d2c5ceb387de6 (diff)
build: basic autoconfization
Diffstat (limited to 'unit.c')
-rw-r--r--unit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/unit.c b/unit.c
index bdbcb45c50..a14e18ef5b 100644
--- a/unit.c
+++ b/unit.c
@@ -351,15 +351,15 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
char *t;
UnitDependency d;
Iterator i;
- char *prefix2;
+ char *p2;
+ const char *prefix2;
assert(u);
if (!prefix)
prefix = "";
- prefix2 = strappend(prefix, "\t");
- if (!prefix2)
- prefix2 = "";
+ p2 = strappend(prefix, "\t");
+ prefix2 = p2 ? p2 : prefix;
fprintf(f,
"%s→ Unit %s:\n"
@@ -397,7 +397,7 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
if (u->meta.job)
job_dump(u->meta.job, f, prefix2);
- free(prefix2);
+ free(p2);
}
/* Common implementation for multiple backends */