Remove casting of return value from *alloc() functions.

This commit is contained in:
Erik de Castro Lopo
2012-04-04 21:29:25 +10:00
parent afedee1251
commit 6c2040dc90
25 changed files with 130 additions and 130 deletions

View File

@@ -259,7 +259,7 @@ FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br)
FLAC__BitReader *FLAC__bitreader_new(void)
{
FLAC__BitReader *br = (FLAC__BitReader*)calloc(1, sizeof(FLAC__BitReader));
FLAC__BitReader *br = calloc(1, sizeof(FLAC__BitReader));
/* calloc() implies:
memset(br, 0, sizeof(FLAC__BitReader));
@@ -294,7 +294,7 @@ FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__CPUInfo cpu, FLAC__Bi
br->words = br->bytes = 0;
br->consumed_words = br->consumed_bits = 0;
br->capacity = FLAC__BITREADER_DEFAULT_CAPACITY;
br->buffer = (uint32_t*)malloc(sizeof(uint32_t) * br->capacity);
br->buffer = malloc(sizeof(uint32_t) * br->capacity);
if(br->buffer == 0)
return false;
br->read_callback = rcb;