From 30c7bc007f594bbf84d872b5fb1f9475610f9683 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 17 Sep 2008 12:29:24 +0200 Subject: [PATCH] browse: when deselecting, don't search twice When deselecting a song in the file browser, the local variable "idx" was initialized and overwritten. Remove the initialization. --- src/screen_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen_file.c b/src/screen_file.c index d40c8ed..7fd86f6 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -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); -- 2.30.2