From a8fc50025e2c3470b0ad9e63d6e9f1bc32ff5e8a Mon Sep 17 00:00:00 2001 From: Jeinzi Date: Sat, 1 Sep 2018 04:14:04 +0200 Subject: Fixed name conflicts. --- src/commands.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/commands.c') diff --git a/src/commands.c b/src/commands.c index 2bc33fe..a989a7c 100644 --- a/src/commands.c +++ b/src/commands.c @@ -54,8 +54,8 @@ int imv_command_exec(struct imv_commands *cmds, struct list *commands, void *dat struct list *args = list_from_string(command, ' '); if(args->len > 0) { - for(size_t i = 0; i < cmds->command_list->len; ++i) { - struct command *cmd = cmds->command_list->items[i]; + for(size_t j = 0; j < cmds->command_list->len; ++j) { + struct command *cmd = cmds->command_list->items[j]; if(!strcmp(cmd->command, args->items[0])) { if(cmd->handler) { /* argstr = all args as a single string */ @@ -63,10 +63,10 @@ int imv_command_exec(struct imv_commands *cmds, struct list *commands, void *dat cmd->handler(args, argstr, data); ret = 0; } else if(cmd->alias) { - struct list *commands = list_create(); - list_append(commands, cmd->alias); - ret = imv_command_exec(cmds, commands, data); - list_free(commands); + struct list *command_list = list_create(); + list_append(command_list, cmd->alias); + ret = imv_command_exec(cmds, command_list, data); + list_free(command_list); } break; } -- cgit v1.2.3