[ros-dev] [ros-diffs] [dgorbachev] 39422: Fix bug #4129 in CmpGetNameControlBlock().
Ged
gedmurphy at gmail.com
Mon Feb 16 19:42:40 CET 2009
IMO parenthesis should always be used, it helps to clarify what the
developer who wrote the code really wanted.
I also find code which makes use of parenthesis much easier to read quickly,
although that's probably just a personal preference.
Ged.
-----Original Message-----
From: ros-dev-bounces at reactos.org [mailto:ros-dev-bounces at reactos.org] On
Behalf Of Aleksey Bragin
Sent: 16 February 2009 18:27
To: ReactOS Development List
Subject: Re: [ros-dev] [ros-diffs] [dgorbachev] 39422: Fix bug #4129 in
CmpGetNameControlBlock().
Good, let's discuss it developers-wide then, and add a result into
the (to become official) Coding Style Guidelines for kernel-mode code.
The only thing I'm bothered with is to keep the style consistent
across kernel (and drivers, where possible). And right now bracing
arguments of && and || prevails.
I'm eager to listen to other dev's opinion on that topic. You just
showed one disadvantage of such method. Are there any advantages?
WBR,
Aleksey.
On Feb 16, 2009, at 8:47 PM, Dmitry Gorbachev wrote:
>> No, it's just a matter of coding style used in the kernel.
>
> What is a logical basis for adopting this particular rule?
> Sometimes it is
> not just a matter of preference.
>
> These parentheses are unnecessary for humans, and if they are not
> needed for
> compilers or some other tools, they are bad! Without them, the bug
> could be
> noticed earlier.
>
> Cheers,
> Dmitry
_______________________________________________
Ros-dev mailing list
Ros-dev at reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
More information about the Ros-dev
mailing list