aboutsummaryrefslogtreecommitdiff
path: root/src/update_walk.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-02-12 17:50:30 +0100
committerMax Kellermann <max@duempel.org>2012-02-12 17:50:30 +0100
commitac3ad452c03292e4c57b0d0e21c2dd407eb03a27 (patch)
tree10e12f06f7a62a0cab6eb0bf06a4e8a09e2d0d78 /src/update_walk.c
parent027c01511cfb8eac1a2e3f9fc54cfbb2bf968870 (diff)
playlist_vector: use the list_head library
Diffstat (limited to 'src/update_walk.c')
-rw-r--r--src/update_walk.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/update_walk.c b/src/update_walk.c
index e2f7d331..ba92cbc4 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;
}
}