aboutsummaryrefslogtreecommitdiffstats
path: root/src/mpdclient.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-17 12:29:07 +0200
committerMax Kellermann <max@duempel.org>2008-09-17 12:29:07 +0200
commit75348aad7cbddb9ef736a0ecca9e3ddfb8b75f8d (patch)
tree5fb6924e98b6882e8a63771578e56c7c156101a4 /src/mpdclient.c
parent9e7dda69f7951f678a1b31d693dba90199d17248 (diff)
downloadmpd-75348aad7cbddb9ef736a0ecca9e3ddfb8b75f8d.tar.gz
mpd-75348aad7cbddb9ef736a0ecca9e3ddfb8b75f8d.tar.xz
mpd-75348aad7cbddb9ef736a0ecca9e3ddfb8b75f8d.zip
make several functions return void
Diffstat (limited to 'src/mpdclient.c')
-rw-r--r--src/mpdclient.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mpdclient.c b/src/mpdclient.c
index ae4a7618f..f67b09133 100644
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
@@ -168,7 +168,7 @@ mpdclient_new(void)
return c;
}
-mpdclient_t *
+void
mpdclient_free(mpdclient_t *c)
{
mpdclient_disconnect(c);
@@ -179,8 +179,6 @@ mpdclient_free(mpdclient_t *c)
g_list_free(c->playlist_callbacks);
g_list_free(c->browse_callbacks);
g_free(c);
-
- return NULL;
}
gint
@@ -738,14 +736,14 @@ mpdclient_playlist_update_changes(mpdclient_t *c)
/*** Filelist functions *****************************************************/
/****************************************************************************/
-mpdclient_filelist_t *
+void
mpdclient_filelist_free(mpdclient_filelist_t *filelist)
{
GList *list = g_list_first(filelist->list);
D("mpdclient_filelist_free()\n");
if (list == NULL)
- return NULL;
+ return;
while (list != NULL) {
filelist_entry_t *entry = list->data;
@@ -760,8 +758,6 @@ mpdclient_filelist_free(mpdclient_filelist_t *filelist)
filelist->list = NULL;
filelist->length = 0;
g_free(filelist);
-
- return NULL;
}
@@ -836,8 +832,10 @@ mpdclient_filelist_search_utf8(mpdclient_t *c,
filelist->length++;
}
- if (mpdclient_finish_command(c))
- return mpdclient_filelist_free(filelist);
+ if (mpdclient_finish_command(c)) {
+ mpdclient_filelist_free(filelist);
+ return NULL;
+ }
filelist->updated = TRUE;
return filelist;
@@ -868,7 +866,7 @@ mpdclient_filelist_update(mpdclient_t *c, mpdclient_filelist_t *filelist)
{
gchar *path = g_strdup(filelist->path);
- filelist = mpdclient_filelist_free(filelist);
+ mpdclient_filelist_free(filelist);
filelist = mpdclient_filelist_get(c, path);
g_free(path);
return filelist;