aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_play.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_play.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 'src/screen_play.c')
-rw-r--r--src/screen_play.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/screen_play.c b/src/screen_play.c
index 736be9271..a1bb369e6 100644
--- a/src/screen_play.c
+++ b/src/screen_play.c
@@ -73,14 +73,14 @@ playlist_changed_callback(mpdclient_t *c, int event, gpointer data)
}
static const char *
-list_callback(int index, int *highlight, void *data)
+list_callback(int idx, int *highlight, void *data)
{
static char songname[MAX_SONG_LENGTH];
mpdclient_t *c = (mpdclient_t *) data;
mpd_Song *song;
*highlight = 0;
- if( (song=playlist_get_song(c, index)) == NULL ) {
+ if( (song=playlist_get_song(c, idx)) == NULL ) {
return NULL;
}
@@ -96,16 +96,16 @@ center_playing_item(screen_t *screen, mpdclient_t *c)
{
int length = c->playlist.length;
int offset = lw->selected - lw->start;
- int index;
+ int idx;
if (!lw || !c->song || length<lw->rows ||
IS_STOPPED(c->status->state))
return 0;
/* try to center the song that are playing */
- index = playlist_get_index(c, c->song);
- D("Autocenter song id:%d pos:%d index:%d\n", c->song->id,c->song->pos,index);
- lw->start = index - (lw->rows / 2);
+ idx = playlist_get_index(c, c->song);
+ D("Autocenter song id:%d pos:%d index:%d\n", c->song->id,c->song->pos,idx);
+ lw->start = idx - (lw->rows / 2);
if (lw->start + lw->rows > length)
lw->start = length - lw->rows;
if (lw->start < 0)