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:
committed by
Max Kellermann
parent
43761441c9
commit
267b2cd6e6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user