From 1b0a4572f4d1735688d3cbaf1d1de7004cdb30a7 Mon Sep 17 00:00:00 2001 From: Benoit Fouet Date: Thu, 17 Jan 2008 15:49:31 +0000 Subject: Change (a == NULL) condition to (!a) and (a != NULL) condition to (a). Originally committed as revision 25780 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale --- libswscale/swscale-example.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libswscale/swscale-example.c') diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c index 124128b377..e53c0b3ebf 100644 --- a/libswscale/swscale-example.c +++ b/libswscale/swscale-example.c @@ -76,7 +76,7 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat src[i]= (uint8_t*) malloc(srcStride[i]*srcH); dst[i]= (uint8_t*) malloc(dstStride[i]*dstH); out[i]= (uint8_t*) malloc(refStride[i]*h); - if (src[i] == NULL || dst[i] == NULL || out[i] == NULL) { + if (!src[i] || !dst[i] || !out[i]) { perror("Malloc"); res = -1; @@ -86,7 +86,7 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat dstContext = outContext = NULL; srcContext= sws_getContext(w, h, PIX_FMT_YUV420P, srcW, srcH, srcFormat, flags, NULL, NULL, NULL); - if (srcContext == NULL) { + if (!srcContext) { fprintf(stderr, "Failed to get %s ---> %s\n", sws_format_name(PIX_FMT_YUV420P), sws_format_name(srcFormat)); @@ -95,7 +95,7 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat goto end; } dstContext= sws_getContext(srcW, srcH, srcFormat, dstW, dstH, dstFormat, flags, NULL, NULL, NULL); - if (dstContext == NULL) { + if (!dstContext) { fprintf(stderr, "Failed to get %s ---> %s\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); @@ -104,7 +104,7 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat goto end; } outContext= sws_getContext(dstW, dstH, dstFormat, w, h, PIX_FMT_YUV420P, flags, NULL, NULL, NULL); - if (outContext == NULL) { + if (!outContext) { fprintf(stderr, "Failed to get %s ---> %s\n", sws_format_name(dstFormat), sws_format_name(PIX_FMT_YUV420P)); -- cgit v1.2.3