diff options
author | Gabriel Dume <gabriel.ddx84@gmail.com> | 2014-08-14 16:31:24 -0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-08-15 03:18:18 -0700 |
commit | f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 (patch) | |
tree | 5b93402fb37cc43b899451a5d2b65bfc03d7887b /libavcodec/zmbvenc.c | |
parent | efd26bedec9a345a5960dbfcbaec888418f2d4e6 (diff) | |
download | ffmpeg-f929ab0569ff31ed5a59b0b0adb7ce09df3fca39.tar.gz |
cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/zmbvenc.c')
-rw-r--r-- | libavcodec/zmbvenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c index 785ee0a409..d7b518db26 100644 --- a/libavcodec/zmbvenc.c +++ b/libavcodec/zmbvenc.c @@ -298,7 +298,7 @@ static av_cold int encode_init(AVCodecContext *avctx) memset(&c->zstream, 0, sizeof(z_stream)); c->comp_size = avctx->width * avctx->height + 1024 + ((avctx->width + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * ((avctx->height + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * 2 + 4; - if ((c->work_buf = av_malloc(c->comp_size)) == NULL) { + if (!(c->work_buf = av_malloc(c->comp_size))) { av_log(avctx, AV_LOG_ERROR, "Can't allocate work buffer.\n"); return AVERROR(ENOMEM); } @@ -307,12 +307,12 @@ static av_cold int encode_init(AVCodecContext *avctx) ((c->comp_size + 63) >> 6) + 11; /* Allocate compression buffer */ - if ((c->comp_buf = av_malloc(c->comp_size)) == NULL) { + if (!(c->comp_buf = av_malloc(c->comp_size))) { av_log(avctx, AV_LOG_ERROR, "Can't allocate compression buffer.\n"); return AVERROR(ENOMEM); } c->pstride = FFALIGN(avctx->width, 16); - if ((c->prev = av_malloc(c->pstride * avctx->height)) == NULL) { + if (!(c->prev = av_malloc(c->pstride * avctx->height))) { av_log(avctx, AV_LOG_ERROR, "Can't allocate picture.\n"); return AVERROR(ENOMEM); } |