summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b93a0ba)
raw | patch | inline | side by side (parent: b93a0ba)
author | Max Kellermann <max@duempel.org> | |
Fri, 19 Sep 2008 12:42:09 +0000 (14:42 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 19 Sep 2008 12:42:09 +0000 (14:42 +0200) |
A caller must not pass NULL to mpdclient_filelist_find_song().
Replace the check with an assertion.
Replace the check with an assertion.
src/filelist.c | patch | blob | history |
diff --git a/src/filelist.c b/src/filelist.c
index 6f938ea3069aa3d5ae6ec985c619264023c7fe9f..7b45416062038f778f765bc1a6f17923860f21e1 100644 (file)
--- a/src/filelist.c
+++ b/src/filelist.c
#include "libmpdclient.h"
#include <string.h>
+#include <assert.h>
void
mpdclient_filelist_free(struct filelist *filelist)
{
GList *list = g_list_first(fl->list);
- while (list && song) {
+ assert(song != NULL);
+
+ while (list != NULL) {
filelist_entry_t *entry = list->data;
mpd_InfoEntity *entity = entry->entity;