aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-29 09:38:29 +0200
committerMax Kellermann <max@duempel.org>2008-08-29 09:38:29 +0200
commitad0e09b2db5ebf428acc98f90c3ef0dd171bebbb (patch)
tree8d3421da76a85ec1918a4fc479d2d60b5a3904d1 /src/locate.c
parent6f72fe3ecffd8ee8218fc5a19ec45b0447323c12 (diff)
downloadmpd-ad0e09b2db5ebf428acc98f90c3ef0dd171bebbb.tar.gz
mpd-ad0e09b2db5ebf428acc98f90c3ef0dd171bebbb.tar.xz
mpd-ad0e09b2db5ebf428acc98f90c3ef0dd171bebbb.zip
tag: converted MpdTag.items to a pointer list
This prepares the following patches, which aim to reduce MPD's memory usage: we plan to share tag_item instances, instead of just their values.
Diffstat (limited to 'src/locate.c')
-rw-r--r--src/locate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/locate.c b/src/locate.c
index f68afdedb..76e229f4c 100644
--- a/src/locate.c
+++ b/src/locate.c
@@ -142,11 +142,11 @@ static int strstrSearchTag(Song * song, enum tag_type type, char *str)
for (i = 0; i < song->tag->numOfItems && !ret; i++) {
if (type != LOCATE_TAG_ANY_TYPE &&
- song->tag->items[i].type != type) {
+ song->tag->items[i]->type != type) {
continue;
}
- duplicate = strDupToUpper(song->tag->items[i].value);
+ duplicate = strDupToUpper(song->tag->items[i]->value);
if (strstr(duplicate, str))
ret = 1;
free(duplicate);
@@ -186,11 +186,11 @@ static int tagItemFoundAndMatches(Song * song, enum tag_type type, char *str)
for (i = 0; i < song->tag->numOfItems; i++) {
if (type != LOCATE_TAG_ANY_TYPE &&
- song->tag->items[i].type != type) {
+ song->tag->items[i]->type != type) {
continue;
}
- if (0 == strcmp(str, song->tag->items[i].value))
+ if (0 == strcmp(str, song->tag->items[i]->value))
return 1;
}