summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ed50c7)
raw | patch | inline | side by side (parent: 9ed50c7)
author | Max Kellermann <max@duempel.org> | |
Fri, 19 Sep 2008 12:10:35 +0000 (14:10 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 19 Sep 2008 12:10:35 +0000 (14:10 +0200) |
Follow the same code style als MPD itself.
src/mpdclient.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 1b548661658c9c21588826aa5413bb2f0ef2f653..a2e272119e8a13d62c172ced23d006f85a17bcc5 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
int
mpdclient_filelist_add_all(mpdclient_t *c, mpdclient_filelist_t *fl)
{
- GList *list = g_list_first(fl->list);
-
- if( fl->list==NULL || fl->length<1 )
- return 0;
-
- mpd_sendCommandListBegin(c->connection);
- while( list )
- {
- filelist_entry_t *entry = list->data;
- mpd_InfoEntity *entity = entry->entity;
-
- if( entity && entity->type==MPD_INFO_ENTITY_TYPE_SONG )
- {
- struct mpd_song *song = entity->info.song;
-
- mpd_sendAddCommand(c->connection, song->file);
- }
- list = list->next;
- }
- mpd_sendCommandListEnd(c->connection);
- return mpdclient_finish_command(c);
-}
-
+ GList *list = g_list_first(fl->list);
+ if (fl->list == NULL || fl->length < 1)
+ return 0;
+ mpd_sendCommandListBegin(c->connection);
+ while (list) {
+ filelist_entry_t *entry = list->data;
+ mpd_InfoEntity *entity = entry->entity;
+ if (entity && entity->type == MPD_INFO_ENTITY_TYPE_SONG) {
+ struct mpd_song *song = entity->info.song;
+ mpd_sendAddCommand(c->connection, song->file);
+ }
+ list = list->next;
+ }
+ mpd_sendCommandListEnd(c->connection);
+ return mpdclient_finish_command(c);
+}
GList *
mpdclient_get_artists_utf8(mpdclient_t *c)