mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
fix all bare malloc() realloc() etc calls to have a proper cast in front
This commit is contained in:
@@ -83,7 +83,7 @@ char* FLAC_plugin__charset_convert_string (const char *string, char *from, char
|
||||
/* Due to a GLIBC bug, round outbuf_size up to a multiple of 4 */
|
||||
/* + 1 for nul in case len == 1 */
|
||||
outsize = ((length + 3) & ~3) + 1;
|
||||
out = malloc(outsize);
|
||||
out = (char*)malloc(outsize);
|
||||
outleft = outsize - 1;
|
||||
outptr = out;
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ FLAC__bool FLAC_plugin__tags_add_tag_utf8(FLAC__StreamMetadata *tags, const char
|
||||
const size_t value_len = strlen(value);
|
||||
const size_t separator_len = strlen(separator);
|
||||
FLAC__byte *new_entry;
|
||||
if(0 == (new_entry = realloc(entry->entry, entry->length + value_len + separator_len + 1)))
|
||||
if(0 == (new_entry = (FLAC__byte*)realloc(entry->entry, entry->length + value_len + separator_len + 1)))
|
||||
return false;
|
||||
memcpy(new_entry+entry->length, separator, separator_len);
|
||||
entry->length += separator_len;
|
||||
|
||||
Reference in New Issue
Block a user