summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-06-20 20:12:15 +0000
committerThomas Martitz <kugel@rockbox.org>2011-06-20 20:12:15 +0000
commite0637255341a165e1e186e6f2836c614f0121c8b (patch)
tree248fb995e73cfb4b623a5d041e3e28b311fbafde /apps/tagcache.c
parent38da400e58b78f0fd399bdb8e52e1ba63aca75a7 (diff)
downloadrockbox-e0637255341a165e1e186e6f2836c614f0121c8b.tar.gz
rockbox-e0637255341a165e1e186e6f2836c614f0121c8b.zip
Dircache: Return the size of the result string in dircache_copy_path() so that callers don't need to call strlen on it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30034 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 0c85fc5957..080f4198c3 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -1481,10 +1481,10 @@ static bool get_next(struct tagcache_search *tcs)
1481 if (tcs->type == tag_filename && (flag & FLAG_DIRCACHE) 1481 if (tcs->type == tag_filename && (flag & FLAG_DIRCACHE)
1482 && is_dircache_intact()) 1482 && is_dircache_intact())
1483 { 1483 {
1484 dircache_copy_path((struct dircache_entry *)tcs->position, 1484 size_t len = dircache_copy_path((struct dircache_entry *)tcs->position,
1485 buf, sizeof buf); 1485 buf, sizeof buf);
1486 tcs->result_len = len + 1;
1486 tcs->result = buf; 1487 tcs->result = buf;
1487 tcs->result_len = strlen(buf) + 1;
1488 tcs->ramresult = false; 1488 tcs->ramresult = false;
1489 1489
1490 return true; 1490 return true;