[ros-dev] [ros-diffs] [ion] 52596: [NTDLL]: More attempts at fixing up the loader, this time in the PE side of things.

Timo Kreuzer timo.kreuzer at web.de
Tue Jul 12 12:44:11 UTC 2011


Am 12.07.2011 00:52, schrieb Alex Ionescu:
> Because that's the convention I keep trying to make you enforce. It avoids confusion.
>
> Yes, you will now argue 10 scenarios where this doesn't matter (such as below).
>
> And by doing so, you will have proven my point:
>
> 1) You can avoid using (() || ()) if you know the 10 exceptions and operator precedence by heart. (Aleksey Method)
But there is no operator involved in "(BoundEntry)", so you don't need 
to know any operator precedence.

> or
> 2) You can always use (() || ()) and never have to worry about anything (in this context). (The Sane Method).
In that case I also suggest using
SomeVariable = (OtherVariable);
return (Status);
if ((x == 2)) return;
SomePointer = &(Structure);
(SomePointer)->Member = (0);

>>     /* Check if we got at least one */
>> -    if (BoundEntry || ImportEntry)
>> +    if ((BoundEntry) || (ImportEntry))
>>

Sorry for being sarcastic, but I just had to do this. You're literally 
asking for it :)

I hope it won't lead to the introduction of something like
#define MY_CONSTANT sizeof(FOO) + 20


Regards,
Timo




More information about the Ros-dev mailing list