aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-10-06 18:46:52 +0200
committerMax Kellermann <max@duempel.org>2008-10-06 18:46:52 +0200
commit267b2cd6e668fb380a53b1377143a5cc7ce949ea (patch)
treea1cea3d612df1e029f7ffb87b46f28b36a0a2d22 /src/directory.c
parent43761441c9bbb763ccde3ae2f7f5508f5cec70ec (diff)
downloadmpd-267b2cd6e668fb380a53b1377143a5cc7ce949ea.tar.gz
mpd-267b2cd6e668fb380a53b1377143a5cc7ce949ea.tar.xz
mpd-267b2cd6e668fb380a53b1377143a5cc7ce949ea.zip
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.
Diffstat (limited to 'src/directory.c')
-rw-r--r--src/directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/directory.c b/src/directory.c
index cb3eb451a..0ce533966 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -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)