song: use flex arrays to store song->url

Reduce the number of allocations we make, so there's less
pressure on the allocator and less overhead to keep track
of the allocations in.
This commit is contained in:
Eric Wong
2008-10-06 18:46:52 +02:00
committed by Max Kellermann
parent 43761441c9
commit 267b2cd6e6
4 changed files with 25 additions and 17 deletions

View File

@@ -298,7 +298,7 @@ removeDeletedFromDirectory(char *path_max_tmp, Directory * directory)
for (i = sv->nr; --i >= 0; ) { /* cleaner deletes if we go backwards */
Song *song = sv->base[i];
if (!song || !song->url)
if (!song || !*song->url)
continue; /* does this happen?, perhaps assert() */
if (dirname)