OSDN Git Service

Add parentheses to logical expression to avoid the warning:
authorDiego Biurrun <diego@biurrun.de>
Sun, 20 Sep 2009 18:29:48 +0000 (18:29 +0000)
committerDiego Biurrun <diego@biurrun.de>
Sun, 20 Sep 2009 18:29:48 +0000 (18:29 +0000)
libavcodec/utils.c:476: warning: suggest parentheses around && within ||

Originally committed as revision 19933 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/utils.c

index e22bc33..1ec039e 100644 (file)
@@ -472,8 +472,9 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
         avcodec_set_dimensions(avctx, avctx->width, avctx->height);
 
 #define SANE_NB_CHANNELS 128U
-    if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height) ||
-        avctx->channels > SANE_NB_CHANNELS) {
+    if (((avctx->coded_width || avctx->coded_height)
+        && avcodec_check_dimensions(avctx, avctx->coded_width, avctx->coded_height))
+        || avctx->channels > SANE_NB_CHANNELS) {
         av_freep(&avctx->priv_data);
         ret = AVERROR(EINVAL);
         goto end;