]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/internal.h
Merge commit '6af2930222ee5d8ce19f3b999a78d85a3c457391'
[ffmpeg] / libavutil / internal.h
index 2d1b37b719420fbbfa51fda1711f2221205be991..612b5f26af3b4f101f66cba49ce056f39aff6323 100644 (file)
 #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
 {\
     p = av_malloc(size);\
-    if (p == NULL && (size) != 0) {\
+    if (!(p) && (size) != 0) {\
         av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
         goto label;\
     }\
 #define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)\
 {\
     p = av_mallocz(size);\
-    if (p == NULL && (size) != 0) {\
+    if (!(p) && (size) != 0) {\
         av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
         goto label;\
     }\
 #define FF_ALLOC_ARRAY_OR_GOTO(ctx, p, nelem, elsize, label)\
 {\
     p = av_malloc_array(nelem, elsize);\
-    if (p == NULL) {\
+    if (!p) {\
         av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
         goto label;\
     }\
 #define FF_ALLOCZ_ARRAY_OR_GOTO(ctx, p, nelem, elsize, label)\
 {\
     p = av_mallocz_array(nelem, elsize);\
-    if (p == NULL) {\
+    if (!p) {\
         av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
         goto label;\
     }\