diff options
author | Max Kellermann <max@duempel.org> | 2008-09-16 19:11:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-16 19:11:39 +0200 |
commit | ac9b642dde4c63f35936d19ed937481bc73f8db4 (patch) | |
tree | 377cc9e6a412172389897e5922aefc384c05b3d9 /src/song.c | |
parent | 8135d7dbf86043fb5f4e960ef4d976e4908631f3 (diff) | |
download | mpd-ac9b642dde4c63f35936d19ed937481bc73f8db4.tar.gz mpd-ac9b642dde4c63f35936d19ed937481bc73f8db4.tar.xz mpd-ac9b642dde4c63f35936d19ed937481bc73f8db4.zip |
song: use struct mpd_song
Use a forward declared struct mpd_song instead of the typedef
mpd_Song.
Diffstat (limited to '')
-rw-r--r-- | src/song.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/song.c b/src/song.c index 2d97daf7f..9090f8489 100644 --- a/src/song.c +++ b/src/song.c @@ -35,7 +35,7 @@ #include <stdlib.h> -static void mpd_initSong(mpd_Song * song) { +static void mpd_initSong(struct mpd_song *song) { song->file = NULL; song->artist = NULL; song->album = NULL; @@ -54,7 +54,7 @@ static void mpd_initSong(mpd_Song * song) { song->id = MPD_SONG_NO_ID; } -static void mpd_finishSong(mpd_Song * song) { +static void mpd_finishSong(struct mpd_song *song) { if (song->file) str_pool_put(song->file); if (song->artist) @@ -79,21 +79,21 @@ static void mpd_finishSong(mpd_Song * song) { str_pool_put(song->comment); } -mpd_Song * mpd_newSong(void) { - mpd_Song * ret = malloc(sizeof(mpd_Song)); +struct mpd_song *mpd_newSong(void) { + struct mpd_song *ret = malloc(sizeof(*ret)); mpd_initSong(ret); return ret; } -void mpd_freeSong(mpd_Song * song) { +void mpd_freeSong(struct mpd_song *song) { mpd_finishSong(song); free(song); } -mpd_Song * mpd_songDup(const mpd_Song * song) { - mpd_Song * ret = mpd_newSong(); +struct mpd_song *mpd_songDup(const struct mpd_song *song) { + struct mpd_song *ret = mpd_newSong(); if (song->file) ret->file = str_pool_dup(song->file); |