diff options
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 127c6aa63a..f4e139aafa 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -1427,7 +1427,6 @@ static int build_index(int index_type, struct tagcache_header *h, int tmpfd) | |||
1427 | 1427 | ||
1428 | tempbufidx = 0; | 1428 | tempbufidx = 0; |
1429 | tempbuf_pos = TAGFILE_MAX_ENTRIES * sizeof(struct tempbuf_searchidx); | 1429 | tempbuf_pos = TAGFILE_MAX_ENTRIES * sizeof(struct tempbuf_searchidx); |
1430 | memset(tempbuf+tempbuf_pos, 0, LOOKUP_BUF_DEPTH * sizeof(void **)); | ||
1431 | tempbuf_pos += LOOKUP_BUF_DEPTH * sizeof(void **); | 1430 | tempbuf_pos += LOOKUP_BUF_DEPTH * sizeof(void **); |
1432 | tempbuf_left = tempbuf_size - tempbuf_pos - 8; | 1431 | tempbuf_left = tempbuf_size - tempbuf_pos - 8; |
1433 | if (tempbuf_left - TAGFILE_ENTRY_AVG_LENGTH * TAGFILE_MAX_ENTRIES < 0) | 1432 | if (tempbuf_left - TAGFILE_ENTRY_AVG_LENGTH * TAGFILE_MAX_ENTRIES < 0) |
@@ -1438,6 +1437,7 @@ static int build_index(int index_type, struct tagcache_header *h, int tmpfd) | |||
1438 | 1437 | ||
1439 | lookup = (struct tempbuf_searchidx **) | 1438 | lookup = (struct tempbuf_searchidx **) |
1440 | (tempbuf + sizeof(struct tempbuf_searchidx)*TAGFILE_MAX_ENTRIES); | 1439 | (tempbuf + sizeof(struct tempbuf_searchidx)*TAGFILE_MAX_ENTRIES); |
1440 | memset(lookup, 0, LOOKUP_BUF_DEPTH * sizeof(void **)); | ||
1441 | 1441 | ||
1442 | /* Open the index file, which contains the tag names. */ | 1442 | /* Open the index file, which contains the tag names. */ |
1443 | snprintf(buf, sizeof buf, TAGCACHE_FILE_INDEX, index_type); | 1443 | snprintf(buf, sizeof buf, TAGCACHE_FILE_INDEX, index_type); |
@@ -2024,7 +2024,7 @@ static bool allocate_tagcache(void) | |||
2024 | sizeof(struct ramcache_header) + TAG_COUNT*sizeof(void *); | 2024 | sizeof(struct ramcache_header) + TAG_COUNT*sizeof(void *); |
2025 | logf("tagcache: %d bytes allocated.", stat.ramcache_allocated); | 2025 | logf("tagcache: %d bytes allocated.", stat.ramcache_allocated); |
2026 | logf("at: 0x%04x", audiobuf); | 2026 | logf("at: 0x%04x", audiobuf); |
2027 | audiobuf += (long)((stat.ramcache_allocated & ~0x03) + 0x04); | 2027 | audiobuf += (long)((stat.ramcache_allocated & ~0x03) + 128); |
2028 | 2028 | ||
2029 | return true; | 2029 | return true; |
2030 | } | 2030 | } |