summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-04-14 10:14:41 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2016-04-14 10:14:41 +0200
commit8fae819099a189f03213ee657f44545c1b035f7e (patch)
treea398d2aea2046ae90f149288f9df9befc8d7e4fb /src/systemctl
parent43bbb8f005177bcad135ec894419361f0f420034 (diff)
parent78df0edc1b594017b1d3493eb2033d8a92d9d43f (diff)
Merge pull request #3033 from keszybz/code-cleanups
Code cleanups
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index f0e788a508..91829fcbcf 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3254,7 +3254,7 @@ static int kill_unit(int argc, char *argv[], void *userdata) {
/* --fail was specified */
if (streq(arg_job_mode, "fail"))
- kill_who = strjoina(arg_kill_who, "-fail", NULL);
+ kill_who = strjoina(arg_kill_who, "-fail");
r = expand_names(bus, strv_skip(argv, 1), NULL, &names);
if (r < 0)
@@ -6087,8 +6087,7 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
return r;
STRV_FOREACH(name, names) {
- _cleanup_free_ char *path = NULL;
- char *new_path, *tmp_path;
+ _cleanup_free_ char *path = NULL, *new_path = NULL, *tmp_path = NULL;
r = unit_find_paths(bus, *name, &lp, &path, NULL);
if (r < 0)
@@ -6111,6 +6110,7 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
r = strv_push_pair(paths, new_path, tmp_path);
if (r < 0)
return log_oom();
+ new_path = tmp_path = NULL;
}
return 0;