From: Max Kellermann Date: Wed, 17 Sep 2008 10:25:52 +0000 (+0200) Subject: list_window: don't reset *highlight to 0 X-Git-Tag: v0.12_alpha1~266 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=51f4e9634dc17f7b433967b0cc46a0945cf26b85;p=ncmpc.git list_window: don't reset *highlight to 0 Since the list_window code sets highlight to 0 before it calls the list_callback, the callback itself doesn't have to reset the flag. --- diff --git a/src/screen_artist.c b/src/screen_artist.c index f010a08..eb7b2e5 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -72,7 +72,6 @@ artist_lw_callback(int index, int *highlight, void *data) static char buf[BUFSIZE]; char *str, *str_utf8; - *highlight = 0; if( (str_utf8=(char *) g_list_nth_data(metalist,index))==NULL ) return NULL; diff --git a/src/screen_file.c b/src/screen_file.c index 2640457..16f9352 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -156,7 +156,6 @@ browse_lw_callback(unsigned idx, int *highlight, void *data) filelist_entry_t *entry; mpd_InfoEntity *entity; - *highlight = 0; if( (entry=(filelist_entry_t *)g_list_nth_data(fl->list,idx))==NULL ) return NULL; diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 397933a..9d57397 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -188,7 +188,6 @@ list_callback(unsigned idx, int *highlight, mpd_unused void *data) { static char buf[BUFSIZE]; - *highlight = 0; if (subcmd < 0) { if (idx < (unsigned)command_list_length) { if (cmds[idx].flags & COMMAND_KEY_CONFLICT) diff --git a/src/screen_play.c b/src/screen_play.c index 0426176..c59c766 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -80,7 +80,6 @@ list_callback(unsigned idx, int *highlight, void *data) mpdclient_t *c = (mpdclient_t *) data; mpd_Song *song; - *highlight = 0; if( (song=playlist_get_song(c, idx)) == NULL ) { return NULL; }