summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorGabriel Dume <gabriel.ddx84@gmail.com>2014-08-14 16:31:24 -0400
committerDiego Biurrun <diego@biurrun.de>2014-08-15 03:18:18 -0700
commitf929ab0569ff31ed5a59b0b0adb7ce09df3fca39 (patch)
tree5b93402fb37cc43b899451a5d2b65bfc03d7887b /libavdevice
parentefd26bedec9a345a5960dbfcbaec888418f2d4e6 (diff)
cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/v4l2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index adb289d140..e210dc4b29 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -361,13 +361,13 @@ static int mmap_init(AVFormatContext *ctx)
}
s->buffers = req.count;
s->buf_start = av_malloc(sizeof(void *) * s->buffers);
- 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(sizeof(unsigned int) * s->buffers);
- 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);
@@ -513,7 +513,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
*/