On 12/2/2014 6:48 PM, Joe Perches wrote:
>>> Maybe just return tpm_chip_register(chip)?
>>
>> Even better.
>
> The pattern:
>
> foo = bar();
> if (foo)
> return foo;
>
> return 0;
>
> is fairly common.
That's the debugger friendly version, as you can set a breakpoint on the
error case.
This one is equivalent, but you can't break on the error case:
foo = bar();
return foo;
This one is the least friendly, since you can't break and view the
return code at all:
return bar();
I usually code for clarity and ease of debug, and I leave it to the
compiler to optimize far better than I ever could.
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech