From: Michael Niedermayer Date: Sun, 26 Aug 2018 22:46:54 +0000 (+0200) Subject: avcodec/zmbv: remove useless zero check on dimensions X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=42f053494ca1188fe1b9000d4bba53375ee1dc20;p=ffmpeg avcodec/zmbv: remove useless zero check on dimensions Signed-off-by: Michael Niedermayer --- diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index f91d2e39317..251a72cf317 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -599,12 +599,11 @@ static av_cold int decode_init(AVCodecContext *avctx) c->decomp_size = (avctx->width + 255) * 4 * (avctx->height + 64); /* Allocate decompression buffer */ - if (c->decomp_size) { - if (!(c->decomp_buf = av_mallocz(c->decomp_size))) { - av_log(avctx, AV_LOG_ERROR, - "Can't allocate decompression buffer.\n"); - return AVERROR(ENOMEM); - } + c->decomp_buf = av_mallocz(c->decomp_size); + if (!c->decomp_buf) { + av_log(avctx, AV_LOG_ERROR, + "Can't allocate decompression buffer.\n"); + return AVERROR(ENOMEM); } c->zstream.zalloc = Z_NULL;