[OpenAFS-devel] Fwd: [patch review] libafs solaris cleanup

Garance A Drosihn drosih@rpi.edu
Tue, 13 Feb 2007 16:30:23 -0500


At 11:32 AM -0500 2/12/07, Dale Ghent wrote:
>On Feb 12, 2007, at 9:43 AM, chas williams - CONTRACTOR wrote:
>
>>In message <0A9D8EA8-6E90-4392-8871-3CECABFAB0A5@umbc.edu>,Dale Ghent writes:
>>>7) Because I'm a pedant and try to subscribe to a particular
>>>cstyle... "return code;" -> "return (code);"
>>
>>its been explained to me that return is not a function.
>
>Well, neither is "if" but we tend to use parens with that.
>
>Personally, I just look at it from a call & argument perspective,
>not whether it's really a real function or not.

For what it's worth, sometime in my early freebsd days it was
explained to me that 'return (blah)' is preferred simply because
it makes it easy to replace 'return' with a #define'd macro, if
you needed to do that for some debugging reason.

However, as others have said, it was also stressed to me that
cosmetic changes should be done as separate commits, and not mixed
in with real-changes to the source code.  It adds a bunch of
necessary work for anyone trying to review the patch -- which may
include people looking through the CVS history for a given file.
It's so much easier if you can say "Yes, there are 10,000 lines
changed in this commit, but the object-code is exactly the same
after this commit as it was before the commit.  If you're looking
for some subtle bug which sneaked in during the past five years,
then it did not happen with this commit!"

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu