char *taginfo;
afhi->chunks_total = 0;
- afhi->chunk_table = para_malloc(chunk_table_size * sizeof(size_t));
+ afhi->chunk_table = para_malloc(chunk_table_size * sizeof(uint32_t));
taginfo = mp3_get_id3(map, numbytes, fd);
while (1) {
unsigned long freq, br, fl;
if (afhi->chunks_total >= chunk_table_size) {
chunk_table_size *= 2;
afhi->chunk_table = para_realloc(afhi->chunk_table,
- chunk_table_size * sizeof(size_t));
+ chunk_table_size * sizeof(uint32_t));
}
afhi->chunk_table[afhi->chunks_total] = fpos;
// if (afhi->chunks_total < 10 || !(afhi->chunks_total % 1000))
}
/** Round up x to a multiple of y */
-#define ROUND_UP(x, y) (((x) + ((y) - 1) / (y)) * (y))
+#define ROUND_UP(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
+
/** Get the size of an array */
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))