summaryrefslogtreecommitdiffstats
path: root/libswscale/swscale-example.c
diff options
context:
space:
mode:
authorbenoit <benoit@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-17 15:49:31 +0000
committerbenoit <benoit@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-17 15:49:31 +0000
commit024ccaccf74ce67e59db845efb31293682ea8f51 (patch)
tree0e3f217a5efa106a0f39658ae2ad11c6938d3c41 /libswscale/swscale-example.c
parentef1ae8fd190d1f7afe65a4637e9c493ddec5ec64 (diff)
downloadmpv-024ccaccf74ce67e59db845efb31293682ea8f51.tar.bz2
mpv-024ccaccf74ce67e59db845efb31293682ea8f51.tar.xz
Change (a == NULL) condition to (!a) and (a != NULL) condition to (a).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25780 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale/swscale-example.c')
-rw-r--r--libswscale/swscale-example.c8
1 files changed, 4 insertions, 4 deletions
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));