diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-05-16 23:37:54 +0200 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-05-17 08:41:37 +0200 |
commit | 4723e4b2a4ca7a7df449ab2377770301cce6abf7 (patch) | |
tree | 219aa003b03e0bfdee14041cb3c172a9ae415357 | |
parent | 342aea195051633c69ba7b8c02c82a0e5f8cbde4 (diff) |
systemctl: more cleanup
This is followup on 05cae7f3431446236139434ee58a6275f3cb31e8
I think the intention was to use the newly introduced 'path'
variable in the inner loop instead of p.
-rw-r--r-- | src/systemctl/systemctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 2fa8ecc664..6e98c05152 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -5030,16 +5030,16 @@ static int enable_sysv_units(const char *verb, char **args) { _cleanup_free_ char *path = NULL; if (!isempty(arg_root)) - asprintf(&p, "%s/%s/%s", arg_root, *k, name); + asprintf(&path, "%s/%s/%s", arg_root, *k, name); else - asprintf(&p, "%s/%s", *k, name); + asprintf(&path, "%s/%s", *k, name); - if (!p) { + if (!path) { r = log_oom(); goto finish; } - found_native = access(p, F_OK) >= 0; + found_native = access(path, F_OK) >= 0; if (found_native) break; } |