From ac3ad452c03292e4c57b0d0e21c2dd407eb03a27 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 12 Feb 2012 17:50:30 +0100 Subject: playlist_vector: use the list_head library --- src/update_walk.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/update_walk.c') diff --git a/src/update_walk.c b/src/update_walk.c index e2f7d3315..ba92cbc48 100644 --- a/src/update_walk.c +++ b/src/update_walk.c @@ -26,6 +26,7 @@ #include "exclude.h" #include "directory.h" #include "song.h" +#include "playlist_vector.h" #include "uri.h" #include "mapper.h" #include "path.h" @@ -159,14 +160,10 @@ removeDeletedFromDirectory(struct directory *directory) g_free(path); } - for (const struct playlist_metadata *pm = directory->playlists.head; - pm != NULL;) { - const struct playlist_metadata *next = pm->next; - + struct playlist_metadata *pm, *np; + directory_for_each_playlist_safe(pm, np, directory) { if (!directory_child_is_regular(directory, pm->name)) playlist_vector_remove(&directory->playlists, pm->name); - - pm = next; } } -- cgit v1.2.3