mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
more strict typecasts
This commit is contained in:
@@ -229,10 +229,10 @@ FLAC__MD5Accumulate(struct MD5Context *ctx, const FLAC__int32 * const signal[],
|
||||
const unsigned bytes_needed = channels * samples * bytes_per_sample;
|
||||
|
||||
if(ctx->capacity < bytes_needed) {
|
||||
FLAC__byte *tmp = realloc(ctx->internal_buf, bytes_needed);
|
||||
FLAC__byte *tmp = (FLAC__byte*)realloc(ctx->internal_buf, bytes_needed);
|
||||
if(0 == tmp) {
|
||||
free(ctx->internal_buf);
|
||||
if(0 == (ctx->internal_buf = malloc(bytes_needed)))
|
||||
if(0 == (ctx->internal_buf = (FLAC__byte*)malloc(bytes_needed)))
|
||||
return false;
|
||||
}
|
||||
ctx->internal_buf = tmp;
|
||||
|
||||
Reference in New Issue
Block a user