diff mbox series

[FFmpeg-devel,138/217] avcodec/cook: Don't use 0 for NULL

Message ID 20201202042244.519127-4-andreas.rheinhardt@gmail.com
State Accepted
Commit 711f14080c538484432f406917074bda6d6b48ce
Headers show
Series [FFmpeg-devel,01/45] avcodec/a64multienc: Fix memleak upon init failure
Related show

Checks

Context Check Description
andriy/x86 warning Failed to apply patch

Commit Message

Andreas Rheinhardt Dec. 2, 2020, 4:21 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/cook.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index 9582495442..93c51f5829 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -227,7 +227,7 @@  static av_cold int init_cook_mlt(COOKContext *q)
     int j, ret;
     int mlt_size = q->samples_per_channel;
 
-    if ((q->mlt_window = av_malloc_array(mlt_size, sizeof(*q->mlt_window))) == 0)
+    if (!(q->mlt_window = av_malloc_array(mlt_size, sizeof(*q->mlt_window))))
         return AVERROR(ENOMEM);
 
     /* Initialize the MLT window: simple sine window. */