From: Yu Watanabe Date: Thu, 28 Jun 2018 13:31:47 +0000 (+0900) Subject: systemctl: make variable which stores environment variable constant X-Git-Tag: v240~979^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9462%2Fhead;p=thirdparty%2Fsystemd.git systemctl: make variable which stores environment variable constant --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 9c6156237a2..05e253f5808 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -6778,11 +6778,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;