[FFmpeg-cvslog] avcodec/wmalosslessdec: Add () to protect the arguments of WMASIGN()

Michael Niedermayer git at videolan.org
Wed Feb 18 01:50:25 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 18 01:34:50 2015 +0100| [dfc2a3982fa8de0fdd98d347beef661fe0ab136d] | committer: Michael Niedermayer

avcodec/wmalosslessdec: Add () to protect the arguments of WMASIGN()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dfc2a3982fa8de0fdd98d347beef661fe0ab136d
---

 libavcodec/wmalosslessdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 9612128..c9bcc26 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -176,7 +176,7 @@ typedef struct WmallDecodeCtx {
 } WmallDecodeCtx;
 
 /** Get sign of integer (1 for positive, -1 for negative and 0 for zero) */
-#define WMASIGN(x) ((x > 0) - (x < 0))
+#define WMASIGN(x) (((x) > 0) - ((x) < 0))
 
 static av_cold int decode_init(AVCodecContext *avctx)
 {



More information about the ffmpeg-cvslog mailing list