[Mplayer-cvslog] CVS: main/drivers/radeon radeon_vid.h,1.4,1.5

Moritz Bunkus CVS mosu at mplayerhq.hu
Wed Jan 15 12:17:01 CET 2003


Update of /cvsroot/mplayer/main/drivers/radeon
In directory mail:/var/tmp.root/cvs-serv14644/drivers/radeon

Modified Files:
	radeon_vid.h 
Log Message:
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)

Index: radeon_vid.h
===================================================================
RCS file: /cvsroot/mplayer/main/drivers/radeon/radeon_vid.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- radeon_vid.h	20 Jun 2002 14:37:09 -0000	1.4
+++ radeon_vid.h	15 Jan 2003 11:16:28 -0000	1.5
@@ -52,11 +52,11 @@
 #define IMGFMT_BGR24 (IMGFMT_BGR|24)
 #define IMGFMT_BGR32 (IMGFMT_BGR|32)
 
-#define IMGFMT_IS_RGB(fmt) ((fmt&IMGFMT_RGB_MASK)==IMGFMT_RGB)
-#define IMGFMT_IS_BGR(fmt) ((fmt&IMGFMT_BGR_MASK)==IMGFMT_BGR)
+#define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB)
+#define IMGFMT_IS_BGR(fmt) (((fmt)&IMGFMT_BGR_MASK)==IMGFMT_BGR)
 
-#define IMGFMT_RGB_DEPTH(fmt) (fmt&~IMGFMT_RGB)
-#define IMGFMT_BGR_DEPTH(fmt) (fmt&~IMGFMT_BGR)
+#define IMGFMT_RGB_DEPTH(fmt) ((fmt)&~IMGFMT_RGB)
+#define IMGFMT_BGR_DEPTH(fmt) ((fmt)&~IMGFMT_BGR)
 
 
 /* Planar YUV Formats */



More information about the MPlayer-cvslog mailing list