diff options
author | Max Kellermann <max@duempel.org> | 2008-09-15 12:27:29 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-15 12:27:29 +0200 |
commit | 08c055113f2eacd42fde57b952b548ca45e29eb2 (patch) | |
tree | 2b9a9c41709396532d52020f6c980077748033c8 /src/screen_help.c | |
parent | 8fd244cc61c74522b93b59e75594902a01f936b5 (diff) | |
download | mpd-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 'src/screen_help.c')
-rw-r--r-- | src/screen_help.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/screen_help.c b/src/screen_help.c index b62c61890..2b5dc1f16 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -147,7 +147,7 @@ static list_window_t *lw = NULL; static const char * -list_callback(int index, int *highlight, void *data) +list_callback(int idx, int *highlight, void *data) { static char buf[512]; @@ -158,12 +158,12 @@ list_callback(int index, int *highlight, void *data) } *highlight = 0; - if (index < help_text_rows) { - *highlight = help_text[index].highlight > 0; - if (help_text[index].command == CMD_NONE) { - if (help_text[index].text) - g_snprintf(buf, sizeof(buf), " %s", _(help_text[index].text)); - else if (help_text[index].highlight == 2) { + if (idx < help_text_rows) { + *highlight = help_text[idx].highlight > 0; + if (help_text[idx].command == CMD_NONE) { + if (help_text[idx].text) + g_snprintf(buf, sizeof(buf), " %s", _(help_text[idx].text)); + else if (help_text[idx].highlight == 2) { int i; for (i = 3; i < COLS - 3 && i < sizeof(buf); i++) @@ -174,16 +174,16 @@ list_callback(int index, int *highlight, void *data) return buf; } - if (help_text[index].text) + if (help_text[idx].text) g_snprintf(buf, sizeof(buf), "%20s : %s ", - get_key_names(help_text[index].command, TRUE), - _(help_text[index].text)); + get_key_names(help_text[idx].command, TRUE), + _(help_text[idx].text)); else g_snprintf(buf, sizeof(buf), "%20s : %s ", - get_key_names(help_text[index].command, TRUE), - get_key_description(help_text[index].command)); + get_key_names(help_text[idx].command, TRUE), + get_key_description(help_text[idx].command)); return buf; } |