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?


>> I personally do not prefer the construct above myself, it can be hard to  
>> read, but at the same time I am not inclined to changing code in NFS as  
>> above, this late in the game.
>>     
>
> Ok. It is up to you whether you'll change it or not.
>
> Thank you
>
>   


Reply via email to