[FFmpeg-devel] [PATCH] Fix 4XM decoding on big-endian and unaligned reads
Nicolas George
nicolas.george
Thu Nov 11 22:38:52 CET 2010
Le primidi 21 brumaire, an CCXIX, Vitor Sessak a ?crit?:
>> Also if you already add {} to the macro you could go for the proper
>> do { .. } while (0) (or remove the {}, I don't really care).
> Is there any advantage for one or other way? I find it more readable
> without the do ... while(0).
It has to do with the semicolon at the end. Consider:
if (foo)
macro(bar);
else
something_else();
Without the do-while, it becomes:
if (foo) {
...
}; else
something_else();
which is syntactically incorrect because of the semicolon.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101111/d2ed7c2e/attachment.pgp>
More information about the ffmpeg-devel
mailing list