[FFmpeg-soc] [soc]: r4919 - amr/amrnbdec.c

Benoit Fouet benoit.fouet at free.fr
Tue Aug 4 08:21:37 CEST 2009


On 2009-08-04 01:29, Diego Biurrun wrote:
> On Mon, Aug 03, 2009 at 07:03:43PM -0400, Ronald S. Bultje wrote:
>> On Mon, Aug 3, 2009 at 7:00 PM, Diego Biurrun<diego at biurrun.de> wrote:
>>> On Mon, Aug 03, 2009 at 07:37:42PM +0200, cmcq wrote:
>>>> Use "if { y } else z" style
>>> Please do not use idiosyncratic styles, stick to K&R.
>> If you have:
>>
>> if (x)
>>     a
>> else
>>     b
>>
>> Michael will ask to add {} atop (but not at the bottom), so:
>>
>> if (x) {
>>     a
>> } else
>>     b
> 
> I only remember him asking for
> 
>   if (x) {
>       a
>   } else {
>       b
>   }
> 

the goal is to limit diffs on future modifications.
if you have to add an else if clause, it is the same whether you have
the braces for the else clause or not.
If it was just a question of small diff output when adding things along
with 'b' above, we would always use braces.

anyway, the solution Colin used is 5 chars less ! that's disk space saved ;)

Ben


More information about the FFmpeg-soc mailing list