aboutsummaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorJeinzi <Jeinzi@gmx.de>2018-09-01 04:14:04 +0200
committerJeinzi <Jeinzi@gmx.de>2018-09-01 04:14:04 +0200
commita8fc50025e2c3470b0ad9e63d6e9f1bc32ff5e8a (patch)
treea1ff2d888462858a4e6e6391df49b1e4e656d0b8 /src/commands.c
parent3974eaebe657b989ce55a85fc24bc7fd09e67c00 (diff)
downloadimv-a8fc50025e2c3470b0ad9e63d6e9f1bc32ff5e8a.tar.gz
Fixed name conflicts.
Diffstat (limited to 'src/commands.c')
-rw-r--r--src/commands.c12
1 files changed, 6 insertions, 6 deletions
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;
}