summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-05-30 20:28:09 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-05-30 20:44:41 -0400
commit1058cbf2ad3d62d039f8f0be92d9d37777925a39 (patch)
tree3fdffa04f0eab31f9a075c6d5e0da5a02a1c8933 /src/shared
parent76d5a71de99b6fe0ecc9bfd82ec641a5d408e191 (diff)
systemctl: suggest 'systemctl daemon-reload' without --system
--system is default anyway, and some poor user might type 9 characters without needing to.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 673e0da6b6..2edf9cd875 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -850,18 +850,18 @@ int readlink_malloc(const char *p, char **r) {
}
int readlink_and_make_absolute(const char *p, char **r) {
- char *target, *k;
+ _cleanup_free_ char *target = NULL;
+ char *k;
int j;
assert(p);
assert(r);
- if ((j = readlink_malloc(p, &target)) < 0)
+ j = readlink_malloc(p, &target);
+ if (j < 0)
return j;
k = file_in_same_dir(p, target);
- free(target);
-
if (!k)
return -ENOMEM;