static void flush_##KIND(struct aec_stream *strm) \
{ \
int i; \
- int64_t x, d, th, D, lower, m, sample; \
+ int64_t x, d, th, D, lower, m; \
int64_t data; \
struct internal_state *state = strm->state; \
\
if (strm->bits_per_sample > 32 || strm->bits_per_sample == 0)
return AEC_CONF_ERROR;
- state = (struct internal_state *) malloc(sizeof(struct internal_state));
+ state = malloc(sizeof(struct internal_state));
if (state == NULL)
return AEC_MEM_ERROR;
- state->se_table = (int *) malloc(182 * sizeof(int));
+ state->se_table = malloc(182 * sizeof(int));
if (state->se_table == NULL)
return AEC_MEM_ERROR;
}
state->id_table[modi - 1] = m_uncomp;
- state->block = (int64_t *)malloc(strm->block_size * sizeof(int64_t));
+ state->block = malloc(strm->block_size * sizeof(int64_t));
if (state->block == NULL)
return AEC_MEM_ERROR;
state->buf_size = strm->rsi * strm->block_size;
- state->buf = (uint32_t *)malloc(state->buf_size * sizeof(uint32_t));
+ state->buf = malloc(state->buf_size * sizeof(uint32_t));
if (state->buf == NULL)
return AEC_MEM_ERROR;
if (strm->rsi > 4096)
return AEC_CONF_ERROR;
- state = (struct internal_state *)malloc(sizeof(struct internal_state));
+ state = malloc(sizeof(struct internal_state));
if (state == NULL)
return AEC_MEM_ERROR;
state->kmax = (1U << state->id_len) - 3;
- state->data_pp = (uint32_t *)malloc(strm->rsi
- * strm->block_size
- * sizeof(uint32_t));
+ state->data_pp = malloc(strm->rsi
+ * strm->block_size
+ * sizeof(uint32_t));
if (state->data_pp == NULL)
return AEC_MEM_ERROR;
if (strm->flags & AEC_DATA_PREPROCESS) {
- state->data_raw = (uint32_t *)malloc(strm->rsi
- * strm->block_size
- * sizeof(uint32_t));
+ state->data_raw = malloc(strm->rsi
+ * strm->block_size
+ * sizeof(uint32_t));
if (state->data_raw == NULL)
return AEC_MEM_ERROR;
} else {
/* Largest possible CDS according to specs */
state->cds_len = (5 + 64 * 32) / 8 + 3;
- state->cds_buf = (uint8_t *)malloc(state->cds_len);
+ state->cds_buf = malloc(state->cds_len);
if (state->cds_buf == NULL)
return AEC_MEM_ERROR;