diff options
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/eval.c | 2 | ||||
-rw-r--r-- | libavutil/file.c | 2 | ||||
-rw-r--r-- | libavutil/imgutils.h | 2 | ||||
-rw-r--r-- | libavutil/internal.h | 8 |
4 files changed, 7 insertions, 7 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c index 99993b9d49..5099e57fae 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -359,7 +359,7 @@ static int parse_primary(AVExpr **e, Parser *p) } p->s= strchr(p->s, '('); - if (p->s==NULL) { + if (!p->s) { av_log(p, AV_LOG_ERROR, "Undefined constant or missing '(' in '%s'\n", s0); p->s= next; av_expr_free(d); diff --git a/libavutil/file.c b/libavutil/file.c index 45fe8538de..5e0dc7ab68 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -152,7 +152,7 @@ int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_c *filename = av_malloc(len); #endif /* -----common section-----*/ - if (*filename == NULL) { + if (!*filename) { av_log(&file_log_ctx, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n"); return AVERROR(ENOMEM); } diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h index 23282a38fa..2ec246aa48 100644 --- a/libavutil/imgutils.h +++ b/libavutil/imgutils.h @@ -130,7 +130,7 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], * line sizes will be set. If a planar format is specified, several * pointers will be set pointing to the different picture planes and * the line sizes of the different planes will be stored in the - * lines_sizes array. Call with src == NULL to get the required + * lines_sizes array. Call with !src to get the required * size for the src buffer. * * To allocate the buffer and fill in the dst_data and dst_linesize in diff --git a/libavutil/internal.h b/libavutil/internal.h index 2d1b37b719..612b5f26af 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -132,7 +132,7 @@ #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;\ }\ @@ -141,7 +141,7 @@ #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;\ }\ @@ -150,7 +150,7 @@ #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;\ }\ @@ -159,7 +159,7 @@ #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;\ }\ |