return;
}
sz = PARA_MIN(((size_t)afhi->chunks_total + 1) * 4, ct->size) + 1;
- afhi->chunk_table = para_malloc(sz);
+ afhi->chunk_table = alloc(sz);
for (i = 0; i <= afhi->chunks_total && i * 4 + 3 < ct->size; i++)
afhi->chunk_table[i] = read_u32(ct->data + 4 * i);
}
if (ret < 0)
return ret;
if (!d->hash)
- d->hash = para_malloc(HASH_SIZE);
+ d->hash = alloc(HASH_SIZE);
memcpy(d->hash, tmp_hash, HASH_SIZE);
free(d->path);
ret = get_audio_file_path_of_row(current_aft_row, &d->path);
int (*compar)(const void *, const void *);
int i;
- options->data_ptr = para_malloc(nmemb * sizeof(*options->data_ptr));
+ options->data_ptr = arr_alloc(nmemb, sizeof(*options->data_ptr));
for (i = 0; i < nmemb; i++)
options->data_ptr[i] = options->data + i;
if (options->num_matching_paths > options->array_size) {
options->array_size++;
options->array_size *= 2;
- options->data = para_realloc(options->data, options->array_size
- * sizeof(*options->data));
+ options->data = arr_realloc(options->data, options->array_size,
+ sizeof(*options->data));
}
d = options->data + tmp;
ret = get_afsi_of_row(aft_row, &d->afsi);
ret = lls_serialize_parse_result(lpr, cmd, NULL, &query.size);
assert(ret >= 0);
query.size += sizeof(*opts);
- query.data = para_malloc(query.size);
+ query.data = alloc(query.size);
opts = query.data;
memset(opts, 0, sizeof(*opts));
slpr = query.data + sizeof(*opts);
size_t afhi_size = sizeof_afhi_buf(afhi);
size_t size = CAB_PATH_OFFSET + path_len + afhi_size
+ sizeof_chunk_table(afhi) + slpr_size;
- char *buf = para_malloc(size);
+ char *buf = alloc(size);
uint32_t pos;
assert(size <= ~(uint32_t)0);
goto out; /* no attribute modifier given */
goto set_atts;
}
- p = para_malloc(len);
+ p = alloc(len);
memcpy(p, arg, len - 1);
p[len - 1] = '\0';
ret = get_attribute_bitnum_by_name(p, &bitnum);