diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2007-03-04 19:26:41 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2007-03-04 19:26:41 +0000 |
commit | 55e1b531db11dd98ea8c23c6c363ccb2c3dfd1e6 (patch) | |
tree | 91e370cf0ad7459f2cb8bb1ba7256d752a74a92c /apps/tagcache.c | |
parent | ce63fcf6ab3303485ef0b7cfbc535af56b3c282d (diff) | |
download | rockbox-55e1b531db11dd98ea8c23c6c363ccb2c3dfd1e6.tar.gz rockbox-55e1b531db11dd98ea8c23c6c363ccb2c3dfd1e6.zip |
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
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 3 |
1 files changed, 2 insertions, 1 deletions
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"; | |||
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | #define UNTAGGED "<Untagged>" | 94 | #define UNTAGGED "<Untagged>" |
95 | #define SIZEOF_UNTAGGED 11 /* Including \0 */ | ||
95 | 96 | ||
96 | /* Previous path when scanning directory tree recursively. */ | 97 | /* Previous path when scanning directory tree recursively. */ |
97 | static char curpath[TAG_MAXLEN+32]; | 98 | static char curpath[TAG_MAXLEN+32]; |
@@ -1524,7 +1525,7 @@ static int check_if_empty(char **tag) | |||
1524 | if (*tag == NULL || *tag[0] == '\0') | 1525 | if (*tag == NULL || *tag[0] == '\0') |
1525 | { | 1526 | { |
1526 | *tag = UNTAGGED; | 1527 | *tag = UNTAGGED; |
1527 | return sizeof(UNTAGGED); /* Tag length */ | 1528 | return SIZEOF_UNTAGGED; /* Tag length */ |
1528 | } | 1529 | } |
1529 | 1530 | ||
1530 | length = strlen(*tag); | 1531 | length = strlen(*tag); |