[FFmpeg-devel] & vs. &&

Kostya kostya.shishkov
Mon Oct 12 15:46:38 CEST 2009


On Mon, Oct 12, 2009 at 02:21:06PM +0200, Benoit Fouet wrote:
> Hi,
> 
[...]
> second one:
> libavcodec/vc1dec.c:2318: warning: suggest parentheses around operand of
> ?!? or change ?&? to ?&&? or ?!? to ?~?
> =========== ><8 ===========
> if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i];
> =========== 8>< ===========
> 
> although this is the same functionnaly as '!is_intra[i] && is_coded[i]',
> I find the latter more close to what we really want to test.
> 
> I'd suspect the second case should be fixed as suggested (i.e. '&' =>
> '&&'), but would like to hear knowledgeable people for the first one.

Yep, it should be the same for the second case, so change it if you like.



More information about the ffmpeg-devel mailing list