OSDN Git Service

Add missing parentheses in MKTAG and MKBETAG macros.
authorBenoit Fouet <benoit.fouet@free.fr>
Tue, 22 Jun 2010 15:02:09 +0000 (15:02 +0000)
committerBenoit Fouet <benoit.fouet@free.fr>
Tue, 22 Jun 2010 15:02:09 +0000 (15:02 +0000)
Originally committed as revision 23711 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavutil/common.h

index 4aa00a9..ba67b4a 100644 (file)
@@ -178,8 +178,8 @@ static inline av_const int av_ceil_log2(int x)
     return av_log2((x - 1) << 1);
 }
 
-#define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24))
-#define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24))
+#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
+#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24))
 
 /*!
  * \def GET_UTF8(val, GET_BYTE, ERROR)