[ros-dev] [ros-diffs] [dgorbachev] 39422: Fix bug #4129 in CmpGetNameControlBlock().

Ged gedmurphy at gmail.com
Mon Feb 16 20:43:17 CET 2009


Why would anyone want to make an assignment like this inside an if
statement?
This is just a one-off case of a silly programming error.

I would personally always use parenthesis here, but I've never made this
mistake.
If other people choose not to do then that's up to them. I don't think our
style guideline needs to be, or even can be so strict.

Ged.

-----Original Message-----
From: ros-dev-bounces at reactos.org [mailto:ros-dev-bounces at reactos.org] On
Behalf Of Timo Kreuzer
Sent: 16 February 2009 19:22
To: ReactOS Development List
Subject: Re: [ros-dev] [ros-diffs] [dgorbachev] 39422: Fix bug #4129 in
CmpGetNameControlBlock().

Ged schrieb:
> IMO parenthesis should always be used, it helps to clarify what the
> developer who wrote the code really wanted.
>   
In this case the exact opposite is the case. The braces would make you
and the compiler think that the programmer really wanted to make an
assignment inside the if .



_______________________________________________
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