From 55e1b531db11dd98ea8c23c6c363ccb2c3dfd1e6 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sun, 4 Mar 2007 19:26:41 +0000 Subject: You can not use sizeof to find the length of a string git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12598 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/tagcache.c') diff --git a/apps/tagcache.c b/apps/tagcache.c index 7e614aa882..120b8fd918 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -92,6 +92,7 @@ static const char tagcache_thread_name[] = "tagcache"; #endif #define UNTAGGED "" +#define SIZEOF_UNTAGGED 11 /* Including \0 */ /* Previous path when scanning directory tree recursively. */ static char curpath[TAG_MAXLEN+32]; @@ -1524,7 +1525,7 @@ static int check_if_empty(char **tag) if (*tag == NULL || *tag[0] == '\0') { *tag = UNTAGGED; - return sizeof(UNTAGGED); /* Tag length */ + return SIZEOF_UNTAGGED; /* Tag length */ } length = strlen(*tag); -- cgit v1.2.3