From: Max Kellermann Date: Wed, 17 Sep 2008 10:29:24 +0000 (+0200) Subject: browse: when deselecting, don't search twice X-Git-Tag: v0.12_alpha1~262 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=30c7bc007f594bbf84d872b5fb1f9475610f9683;p=ncmpc.git 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. --- 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);