[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7359) [PATCH] MozNSS: prefer unlocked slot when getting private key



Jan VÄ?elák wrote:
> On Tuesday 21 of August 2012 13:38:41, Howard Chu wrote:
>> The quality of this code seems to be getting progressively worse. It seems
>> I've been accepting the last several patches without giving feedback though.
> 
> So thank you for feedback on this patch.
> 
>> 1) the recent patches do not adhere to the existing whitespace conventions.
>> Please fix this.
> 
> Sorry for that. Looks like you already committed the patch. I will send you
> a patch fixing just the whitespaces in my recent changes.

Thanks.

>> 2) the code in this patch is unnecessarily clumsy:
> 
> It's a matter of opinion. In general, I rather see less levels of indentation. 
> That's why I used this construct. But right, you are the maintainer. This code 
> is too short to say that it is more readable and the code produced by the 
> compiler will be the same.

Assuming how the compiler behaves is unsafe and nonportable. Even if you're
only working on a single platform (which we are not) the compiler behavior can
change drastically depending on optimization flags. During debugging you tend
to need to compile without optimization, to be able to see clearly what's
going on. It is best practice to write code that doesn't rely on the optimizer
to kill redundancies, to minimize the difference between debug versions and
deployed/optimized versions.

These are facts, not opinions.

-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/