On Wed, Jul 01, 2009 at 10:24:22AM -0500, Tom Haynes wrote:
> Marcel Telka wrote:
>> On Wed, Jul 01, 2009 at 09:47:00AM -0500, Piyush Shivam wrote:
>>   
>>
>>>> 3. This code is dangerous and/or confusing (assignment in if without a 
>>>> test):
>>>>
>>>> 234                  if (error = VOP_PATHCONF(vp, _PC_FILESIZEBITS, 
>>>> &pc_val, cr,
>>>> 235                      NULL))
>>>> 236                          return (error);
>>>>
>>>> I know this is out of the scope of your fix, but I would like to see it 
>>>> fixed.
>>>>       
>>> Is this a correctness issue? or aesthetics? Can you give a specific   
>>> example where this is an obvious issue?
>>>     
>>
>> It is not obvious whether you wanted to assign (=) or compare (==), because 
>> in
>> if you in most cases want to compare.
>>
>>   
>
> Why hasn't lint or hg nits flagged this?

Should lint and/or hg nits report something like that? I do not know. If so,
then there is probably a bug somewhere. If they are not supposed to report that
we can file an RFE to have such support added.

-- 
Marcel Telka

Reply via email to