summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/tagcache.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 089161abab..6c38300a16 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -1608,7 +1608,7 @@ bool tagcache_fill_tags(struct mp3entry *id3, const char *filename)
1608static inline void write_item(const char *item) 1608static inline void write_item(const char *item)
1609{ 1609{
1610 int len = strlen(item) + 1; 1610 int len = strlen(item) + 1;
1611 1611
1612 data_size += len; 1612 data_size += len;
1613 write(cachefd, item, len); 1613 write(cachefd, item, len);
1614} 1614}
@@ -1616,21 +1616,21 @@ static inline void write_item(const char *item)
1616static int check_if_empty(char **tag) 1616static int check_if_empty(char **tag)
1617{ 1617{
1618 int length; 1618 int length;
1619 1619
1620 if (*tag == NULL || *tag[0] == '\0') 1620 if (*tag == NULL || **tag == '\0')
1621 { 1621 {
1622 *tag = UNTAGGED; 1622 *tag = UNTAGGED;
1623 return sizeof(UNTAGGED); /* Tag length */ 1623 return sizeof(UNTAGGED); /* Tag length */
1624 } 1624 }
1625 1625
1626 length = strlen(*tag); 1626 length = strlen(*tag);
1627 if (length > TAG_MAXLEN) 1627 if (length > TAG_MAXLEN)
1628 { 1628 {
1629 logf("over length tag: %s", *tag); 1629 logf("over length tag: %s", *tag);
1630 length = TAG_MAXLEN; 1630 length = TAG_MAXLEN;
1631 *tag[length] = '\0'; 1631 (*tag)[length] = '\0';
1632 } 1632 }
1633 1633
1634 return length + 1; 1634 return length + 1;
1635} 1635}
1636 1636