aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-27 09:02:13 +0100
committerMax Kellermann <max@duempel.org>2009-02-27 09:02:13 +0100
commitc1ab2d06aaa11823c0310e513b11654cfa67df02 (patch)
tree5671fd96b89ed9446f7aac7a7233dcbadb859a94 /src/locate.c
parent75c2029b1c3b59a5922eebc7cf91607758823c45 (diff)
downloadmpd-c1ab2d06aaa11823c0310e513b11654cfa67df02.tar.gz
mpd-c1ab2d06aaa11823c0310e513b11654cfa67df02.tar.xz
mpd-c1ab2d06aaa11823c0310e513b11654cfa67df02.zip
tag: make tag.num_items unsigned
There's no point in declaring num_items as a uint8_t, it doesn't save any space, due to padding. This allows us to lift the articial "255 items" limitation.
Diffstat (limited to '')
-rw-r--r--src/locate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/locate.c b/src/locate.c
index 653c53009..7ddc06721 100644
--- a/src/locate.c
+++ b/src/locate.c
@@ -141,7 +141,6 @@ locate_item_free(struct locate_item *item)
static bool
locate_tag_search(const struct song *song, enum tag_type type, const char *str)
{
- int i;
char *duplicate;
bool ret = false;
bool visited_types[TAG_NUM_OF_ITEM_TYPES];
@@ -165,7 +164,7 @@ locate_tag_search(const struct song *song, enum tag_type type, const char *str)
memset(visited_types, 0, sizeof(visited_types));
- for (i = 0; i < song->tag->num_items && !ret; i++) {
+ for (unsigned i = 0; i < song->tag->num_items && !ret; i++) {
visited_types[song->tag->items[i]->type] = true;
if (type != LOCATE_TAG_ANY_TYPE &&
song->tag->items[i]->type != type) {