summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 460e071)
raw | patch | inline | side by side (parent: 460e071)
author | Max Kellermann <max@duempel.org> | |
Tue, 29 Sep 2009 20:01:37 +0000 (22:01 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Tue, 29 Sep 2009 20:01:37 +0000 (22:01 +0200) |
libmpdclient2 guarantees that each mpd_song object has an URI.
src/playlist.c | patch | blob | history |
diff --git a/src/playlist.c b/src/playlist.c
index 38a39abadc594f7293bb60fab3cef765ac2e864b..713d3c69fc4b7902c17a45b32d1dc152778f8a00 100644 (file)
--- a/src/playlist.c
+++ b/src/playlist.c
guint i;
for (i = 0; i < c->playlist.list->len; ++i) {
- struct mpd_song *song = playlist_get(&c->playlist, i);
- const char *uri = mpd_song_get_uri(song);
+ const struct mpd_song *song = playlist_get(&c->playlist, i);
- if (uri != NULL && strcmp(uri, filename) == 0)
+ if (strcmp(mpd_song_get_uri(song), filename) == 0)
return (gint)i;
}