summaryrefslogtreecommitdiff
path: root/libavdevice/v4l2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r--libavdevice/v4l2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 64df0c7950..d9ff1a47e2 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -352,12 +352,12 @@ static int mmap_init(AVFormatContext *ctx)
}
s->buffers = req.count;
s->buf_start = av_malloc_array(s->buffers, sizeof(void *));
- if (s->buf_start == NULL) {
+ if (!s->buf_start) {
av_log(ctx, AV_LOG_ERROR, "Cannot allocate buffer pointers\n");
return AVERROR(ENOMEM);
}
s->buf_len = av_malloc_array(s->buffers, sizeof(unsigned int));
- if (s->buf_len == NULL) {
+ if (!s->buf_len) {
av_log(ctx, AV_LOG_ERROR, "Cannot allocate buffer sizes\n");
av_free(s->buf_start);
return AVERROR(ENOMEM);
@@ -558,7 +558,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
#endif
buf_descriptor = av_malloc(sizeof(struct buff_data));
- if (buf_descriptor == NULL) {
+ if (!buf_descriptor) {
/* Something went wrong... Since av_malloc() failed, we cannot even
* allocate a buffer for memcpying into it
*/