diff options
author | Max Kellermann <max@duempel.org> | 2012-02-12 17:50:30 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-02-12 17:50:30 +0100 |
commit | ac3ad452c03292e4c57b0d0e21c2dd407eb03a27 (patch) | |
tree | 10e12f06f7a62a0cab6eb0bf06a4e8a09e2d0d78 /src/playlist_database.c | |
parent | 027c01511cfb8eac1a2e3f9fc54cfbb2bf968870 (diff) | |
download | mpd-ac3ad452c03292e4c57b0d0e21c2dd407eb03a27.tar.gz mpd-ac3ad452c03292e4c57b0d0e21c2dd407eb03a27.tar.xz mpd-ac3ad452c03292e4c57b0d0e21c2dd407eb03a27.zip |
playlist_vector: use the list_head library
Diffstat (limited to 'src/playlist_database.c')
-rw-r--r-- | src/playlist_database.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/playlist_database.c b/src/playlist_database.c index 2ad913d00..6b9d87155 100644 --- a/src/playlist_database.c +++ b/src/playlist_database.c @@ -33,10 +33,10 @@ playlist_database_quark(void) } void -playlist_vector_save(FILE *fp, const struct playlist_vector *pv) +playlist_vector_save(FILE *fp, const struct list_head *pv) { - for (const struct playlist_metadata *pm = pv->head; - pm != NULL; pm = pm->next) + struct playlist_metadata *pm; + playlist_vector_for_each(pm, pv) fprintf(fp, PLAYLIST_META_BEGIN "%s\n" "mtime: %li\n" "playlist_end\n", @@ -44,7 +44,7 @@ playlist_vector_save(FILE *fp, const struct playlist_vector *pv) } bool -playlist_metadata_load(FILE *fp, struct playlist_vector *pv, const char *name, +playlist_metadata_load(FILE *fp, struct list_head *pv, const char *name, GString *buffer, GError **error_r) { struct playlist_metadata pm = { |