mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
lvm shell: clear argv for each command
This commit is contained in:
parent
23a1ced439
commit
9a0f0c70bf
@ -210,7 +210,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
|
||||
{
|
||||
log_report_t saved_log_report_state = log_get_report_state();
|
||||
char *orig_command_log_selection = NULL;
|
||||
int is_lastlog_cmd = 0, argc, ret;
|
||||
int is_lastlog_cmd = 0, argc, ret, i;
|
||||
char *input = NULL, *args[MAX_ARGS], **argv;
|
||||
|
||||
rl_readline_name = "lvm";
|
||||
@ -262,6 +262,9 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
|
||||
|
||||
add_history(input);
|
||||
|
||||
for (i = 0; i < MAX_ARGS; i++)
|
||||
args[i] = NULL;
|
||||
|
||||
argv = args;
|
||||
|
||||
if (lvm_split(input, &argc, argv, MAX_ARGS) == MAX_ARGS) {
|
||||
|
Loading…
Reference in New Issue
Block a user