Code

browse: when deselecting, don't search twice
authorMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:29:24 +0000 (12:29 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:29:24 +0000 (12:29 +0200)
When deselecting a song in the file browser, the local variable "idx"
was initialized and overwritten.  Remove the initialization.

src/screen_file.c

index d40c8edc9739094a1a6fcfaed2970a7a35d6c092..7fd86f64519712d3b0da24c5074aaf3af674994d 100644 (file)
@@ -473,7 +473,7 @@ browse_handle_select(screen_t *screen,
                        mpd_Song *song = entry->entity->info.song;
 
                        if( song ) {
-                               int idx = playlist_get_index_from_file(c, song->file);
+                               int idx;
 
                                while( (idx=playlist_get_index_from_file(c, song->file))>=0 )
                                        mpdclient_cmd_delete(c, idx);