From 1ea365082318f06cd42a8b37dd0c7724b599c821 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 14 Sep 2021 21:31:53 +0200 Subject: Replace all occurences of av_mallocz_array() by av_calloc() They do the same. Reviewed-by: Paul B Mahol Signed-off-by: Andreas Rheinhardt --- libavcodec/vorbisenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/vorbisenc.c') diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index 72c6ba1130..858c6ac6dd 100644 --- a/libavcodec/vorbisenc.c +++ b/libavcodec/vorbisenc.c @@ -182,7 +182,7 @@ static int ready_codebook(vorbis_enc_codebook *cb) } else { int vals = cb_lookup_vals(cb->lookup, cb->ndimensions, cb->nentries); cb->dimensions = av_malloc_array(cb->nentries, sizeof(float) * cb->ndimensions); - cb->pow2 = av_mallocz_array(cb->nentries, sizeof(float)); + cb->pow2 = av_calloc(cb->nentries, sizeof(*cb->pow2)); if (!cb->dimensions || !cb->pow2) return AVERROR(ENOMEM); for (i = 0; i < cb->nentries; i++) { @@ -212,7 +212,7 @@ static int ready_residue(vorbis_enc_residue *rc, vorbis_enc_context *venc) { int i; av_assert0(rc->type == 2); - rc->maxes = av_mallocz_array(rc->classifications, sizeof(float[2])); + rc->maxes = av_calloc(rc->classifications, sizeof(*rc->maxes)); if (!rc->maxes) return AVERROR(ENOMEM); for (i = 0; i < rc->classifications; i++) { -- cgit v1.2.1