Code

list_window: don't reset *highlight to 0
authorMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:25:52 +0000 (12:25 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:25:52 +0000 (12:25 +0200)
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.

src/screen_artist.c
src/screen_file.c
src/screen_keydef.c
src/screen_play.c

index f010a089dcaeea11ef1582c5dcadf01ad40c249a..eb7b2e5d468ebb3e57c5f39e561a40a8aef7ecb7 100644 (file)
@@ -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;
 
index 264045739bad23890b10be28a90beaf8ec77c970..16f9352428def6157fa9c36ac244a4657462f338 100644 (file)
@@ -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;
 
index 397933a14578367e58159f02c765898d8d98ce96..9d573976afccd1ee9c95f61a7573f69f57286665 100644 (file)
@@ -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)
index 0426176d602b52898540cc95384c607c723f97c8..c59c766cd49b5bd3e25985870233c09558249ea7 100644 (file)
@@ -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;
        }