systemctl: fix style to avoid modification of array passed by caller

Followup for 4524439edb.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-02-15 19:06:53 -05:00
parent 4524439edb
commit c11bda1e3c
3 changed files with 18 additions and 20 deletions
+2 -3
View File
@@ -2778,10 +2778,9 @@ static int start_unit(int argc, char *argv[], void *userdata) {
}
if (!arg_no_block) {
int q, arg_count = 1;
const char* extra_args[5] = {NULL};
int q, arg_count = 0;
const char* extra_args[4] = {};
/* leave first empty for the actual command name*/
if (arg_scope != UNIT_FILE_SYSTEM)
extra_args[arg_count++] = "--user";