From f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 Mon Sep 17 00:00:00 2001 From: Gabriel Dume Date: Thu, 14 Aug 2014 16:31:24 -0400 Subject: cosmetics: Write NULL pointer equality checks more compactly Signed-off-by: Diego Biurrun --- libavcodec/dvdsubdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/dvdsubdec.c') diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 02f70be906..856d666b04 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -360,7 +360,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, if (sub_header->num_rects > 0) return is_menu; fail: - if (sub_header->rects != NULL) { + if (!sub_header->rects) { for (i = 0; i < sub_header->num_rects; i++) { av_freep(&sub_header->rects[i]->pict.data[0]); av_freep(&sub_header->rects[i]->pict.data[1]); @@ -391,7 +391,7 @@ static int find_smallest_bounding_rectangle(AVSubtitle *s) int y1, y2, x1, x2, y, w, h, i; uint8_t *bitmap; - if (s->num_rects == 0 || s->rects == NULL || s->rects[0]->w <= 0 || s->rects[0]->h <= 0) + if (s->num_rects == 0 || !s->rects || s->rects[0]->w <= 0 || s->rects[0]->h <= 0) return 0; for(i = 0; i < s->rects[0]->nb_colors; i++) { -- cgit v1.2.3