Code

mpdclient: don't check mpd_song_get_uri()!=NULL
authorMax Kellermann <max@duempel.org>
Fri, 2 Oct 2009 17:57:22 +0000 (19:57 +0200)
committerMax Kellermann <max@duempel.org>
Fri, 2 Oct 2009 17:57:22 +0000 (19:57 +0200)
libmpdclient guarantees that this function always returns non-NULL.

src/mpdclient.c

index 1c21785e2054807c6876bac310906f313663a064..bbc8df8eec88e79b28442ba3c7fb5d90bb4db68e 100644 (file)
@@ -782,10 +782,8 @@ mpdclient_filelist_add_all(struct mpdclient *c, struct filelist *fl)
                    mpd_entity_get_type(entity) == MPD_ENTITY_TYPE_SONG) {
                        const struct mpd_song *song =
                                mpd_entity_get_song(entity);
-                       const char *uri = mpd_song_get_uri(song);
 
-                       if (uri != NULL)
-                               mpd_send_add(c->connection, uri);
+                       mpd_send_add(c->connection, mpd_song_get_uri(song));
                }
        }