summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cb2ec68)
raw | patch | inline | side by side (parent: cb2ec68)
author | Max Kellermann <max@duempel.org> | |
Thu, 18 Sep 2008 21:35:12 +0000 (23:35 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 18 Sep 2008 21:35:12 +0000 (23:35 +0200) |
It is guaranteed that the "song" attribute is not NULL, remove the
check.
check.
src/screen_browser.c | patch | blob | history |
diff --git a/src/screen_browser.c b/src/screen_browser.c
index f3ec8eda67567cd9c447b3214af886e08bdfa514..0a06e5fb35898703a54cfb5c17a2171bf3efe49c 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
if (entry->entity->type != MPD_INFO_ENTITY_TYPE_SONG)
return -1;
+ assert(entry->entity->info.song != NULL);
+
if (!toggle || (entry->flags & HIGHLIGHT) == 0) {
mpd_Song *song = entry->entity->info.song;
} else {
/* remove song from playlist */
mpd_Song *song = entry->entity->info.song;
+ int idx;
entry->flags &= ~HIGHLIGHT;
- if (song) {
- int idx;
-
- while ((idx = playlist_get_index_from_file(c, song->file)) >=0)
- mpdclient_cmd_delete(c, idx);
- }
+ while ((idx = playlist_get_index_from_file(c, song->file)) >=0)
+ mpdclient_cmd_delete(c, idx);
}
return 0;