diff options
author | Max Kellermann <max@duempel.org> | 2008-08-29 09:38:29 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-02 00:15:38 -0700 |
commit | 6aa1a7a2565bd1789fd34c7c71d5dbb34eaa1fee (patch) | |
tree | 8b6022cf1239a0a6962377827b1cb519b20f43ab /src/locate.c | |
parent | 323835240107ba08c080bbd8ed7aebe742fc4475 (diff) | |
download | mpd-6aa1a7a2565bd1789fd34c7c71d5dbb34eaa1fee.tar.gz mpd-6aa1a7a2565bd1789fd34c7c71d5dbb34eaa1fee.tar.xz mpd-6aa1a7a2565bd1789fd34c7c71d5dbb34eaa1fee.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.c | 8 |
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; } |