aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_keydef.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-15 12:27:29 +0200
committerMax Kellermann <max@duempel.org>2008-09-15 12:27:29 +0200
commit08c055113f2eacd42fde57b952b548ca45e29eb2 (patch)
tree2b9a9c41709396532d52020f6c980077748033c8 /src/screen_keydef.c
parent8fd244cc61c74522b93b59e75594902a01f936b5 (diff)
downloadmpd-08c055113f2eacd42fde57b952b548ca45e29eb2.tar.gz
mpd-08c055113f2eacd42fde57b952b548ca45e29eb2.tar.xz
mpd-08c055113f2eacd42fde57b952b548ca45e29eb2.zip
fix shadow warnings
Rename local variables and function parameters, so they don't shadow global variables.
Diffstat (limited to '')
-rw-r--r--src/screen_keydef.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index 11c0a4aee..bc37f1af3 100644
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
@@ -183,33 +183,33 @@ assign_new_key(WINDOW *w, int cmd_index, int key_index)
}
static const char *
-list_callback(int index, int *highlight, void *data)
+list_callback(int idx, int *highlight, void *data)
{
static char buf[BUFSIZE];
*highlight = 0;
if (subcmd < 0) {
- if (index < command_list_length) {
- if (cmds[index].flags & COMMAND_KEY_CONFLICT)
+ if (idx < command_list_length) {
+ if (cmds[idx].flags & COMMAND_KEY_CONFLICT)
*highlight = 1;
- return cmds[index].name;
- } else if (index == LIST_ITEM_APPLY())
+ return cmds[idx].name;
+ } else if (idx == LIST_ITEM_APPLY())
return LIST_ITEM_APPLY_LABEL;
- else if (index == LIST_ITEM_SAVE())
+ else if (idx == LIST_ITEM_SAVE())
return LIST_ITEM_SAVE_LABEL;
} else {
- if (index == 0)
+ if (idx == 0)
return "[..]";
- index--;
- if (index < MAX_COMMAND_KEYS && cmds[subcmd].keys[index] > 0) {
+ idx--;
+ if (idx < MAX_COMMAND_KEYS && cmds[subcmd].keys[idx] > 0) {
g_snprintf(buf,
BUFSIZE, "%d. %-20s (%d) ",
- index + 1,
- key2str(cmds[subcmd].keys[index]),
- cmds[subcmd].keys[index]);
+ idx + 1,
+ key2str(cmds[subcmd].keys[idx]),
+ cmds[subcmd].keys[idx]);
return buf;
- } else if (index == subcmd_addpos) {
- g_snprintf(buf, BUFSIZE, _("%d. Add new key "), index + 1);
+ } else if (idx == subcmd_addpos) {
+ g_snprintf(buf, BUFSIZE, _("%d. Add new key "), idx + 1);
return buf;
}
}