Re: [PATCH] update checkpatch.pl to version 0.08

Jan Engelhardt
2007-07-24T16:51:48Z

On Jul 24 2007 12:19, Andy Whitcroft wrote:
>>>> if (err) {
>>>> do_something();
>>>> return -ERR;
>>>> } else {
>>>> do_somthing_else();
>>>> }
>>>
>>> if (err) {
>>> do_something();
>>> return -ERR;
>>> } else
>>> do_something_else();
>>
>> The kool kids on linux-usb-devel largely ended up deciding that the second
>> version looks dorky.
>
>Ok, now if either the preceeding block or following block has {}'s then
>we don't report this block for being one line long. We will miss some
>this way, but hey.

As per Ingo Molnar [ http://lkml.org/lkml/2006/9/5/68 ],
all blocks in an if-else 'tree' should be {} if there is at least one
with more than two statements. (And I do not disagree.)

Jan
--