aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-17 12:29:24 +0200
committerMax Kellermann <max@duempel.org>2008-09-17 12:29:24 +0200
commit30c7bc007f594bbf84d872b5fb1f9475610f9683 (patch)
treeee0c9e18d3d1f1c0bef97ea5b08c63884815764d
parenta878dcfbfc717f817ae7f3a2ecfbef4c016ee046 (diff)
downloadmpd-30c7bc007f594bbf84d872b5fb1f9475610f9683.tar.gz
mpd-30c7bc007f594bbf84d872b5fb1f9475610f9683.tar.xz
mpd-30c7bc007f594bbf84d872b5fb1f9475610f9683.zip
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.
-rw-r--r--src/screen_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screen_file.c b/src/screen_file.c
index d40c8edc9..7fd86f645 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);