mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Remove casting of return value from *alloc() functions.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user