diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-07-13 20:32:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-13 20:32:37 +0200 |
commit | 99352de644c086ce8afe461abb67dbf05b69ad86 (patch) | |
tree | 3dc5c4eb994b853fac0b3e3f0aa07ff8356b9c0f /src/systemctl/systemctl.c | |
parent | sd-bus: unref slot->match_callback.install_slot when slot is disconnected (diff) | |
parent | systemctl: make variable which stores environment variable constant (diff) | |
download | systemd-99352de644c086ce8afe461abb67dbf05b69ad86.tar.xz systemd-99352de644c086ce8afe461abb67dbf05b69ad86.zip |
Merge pull request #9462 from yuwata/strv_split
make strv_split() accept empty string and use it in pager_open()
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r-- | src/systemctl/systemctl.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 8f337b78a2..e8722f5017 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -6785,11 +6785,9 @@ static int run_editor(char **paths) { if (r < 0) return r; if (r == 0) { - const char **args; - char *editor, **editor_args = NULL; - char **tmp_path, **original_path, *p; - size_t n_editor_args = 0, i = 1; - size_t argc; + char **editor_args = NULL, **tmp_path, **original_path, *p; + size_t n_editor_args = 0, i = 1, argc; + const char **args, *editor; argc = strv_length(paths)/2 + 1; |