summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-21 16:15:49 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-21 17:24:21 +0200
commit4c94096027f21d4ed0efe991534a926d39d52369 (patch)
tree5e148edac536bc86ef4817f6ea986591c19e8096 /src/core/service.c
parent5ed1227238724959f020169f5332086439709b55 (diff)
core: unify how we generate the prefix string when dumping unit state
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 6a4665a1ae..887b1c8514 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -463,16 +463,14 @@ static int service_load(Unit *u) {
}
static void service_dump(Unit *u, FILE *f, const char *prefix) {
-
ServiceExecCommand c;
Service *s = SERVICE(u);
const char *prefix2;
- _cleanup_free_ char *p2 = NULL;
assert(s);
- p2 = strappend(prefix, "\t");
- prefix2 = p2 ? p2 : prefix;
+ prefix = strempty(prefix);
+ prefix2 = strappenda(prefix, "\t");
fprintf(f,
"%sService State: %s\n"