diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-22 20:51:29 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-24 00:25:04 -0400 |
commit | c79bb9e4e2e5b96b2ae2c432bf8b0ff9674fce60 (patch) | |
tree | f33c7648a76b5c19bbae7b08fe567c0cefa0d265 /src/system-update-generator | |
parent | fff87a35d9e26c0d4ea41273a963c0eb20e18da4 (diff) |
Standarize on one spelling of symlink error message
It's polite to print the name of the link that wasn't created,
and it makes little sense to print the target.
Diffstat (limited to 'src/system-update-generator')
-rw-r--r-- | src/system-update-generator/system-update-generator.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/system-update-generator/system-update-generator.c b/src/system-update-generator/system-update-generator.c index 6660192f5e..13b8a0c426 100644 --- a/src/system-update-generator/system-update-generator.c +++ b/src/system-update-generator/system-update-generator.c @@ -36,7 +36,7 @@ static const char *arg_dest = "/tmp"; static int generate_symlink(void) { struct stat st; - char *p; + char _cleanup_free_ *p = NULL; if (lstat("/system-update", &st) < 0) { if (errno == ENOENT) @@ -51,13 +51,10 @@ static int generate_symlink(void) { return log_oom(); if (symlink(SYSTEM_DATA_UNIT_PATH "/system-update.target", p) < 0) { - free(p); - log_error("Failed to create symlink: %m"); + log_error("Failed to create symlink %s: %m", p); return -errno; } - free(p); - return 0; } |