s4:ldb_tdb - Rework/Various

Matthias Dieter Wallnöfer mdw at samba.org
Mon Oct 12 07:51:37 MDT 2009


Hi Andrew,

well I don't like GOTOs as well. But I took a very diffused practice in 
s4 code (result/error handling goto). If you are very unhappy with the 
changed code I'll add additional cosmetics through a new patch which 
revert them partially.

Matthias

Andrew Bartlett schrieb:
> On Wed, 2009-10-07 at 17:19 -0500, Matthias Dieter Wallnöfer wrote:
>   
>> commit 32a7b82e87c71e103c47fee787ed81db6266921f
>> Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
>> Date:   Tue Oct 6 09:30:53 2009 +0200
>>
>>     s4:ldb_tdb - Rework/Various
>>     
>>     - Unify the error handling method with "done" mark in all longer
>> functions
>>     
>
> Matthias, I'm rather concerned about this patch, as it seems do add
> 'goto' statements for little gain.  
>
> Unlike some projects, we don't have a ban on goto in Samba, but we
> dislike it.  The only reason you see so much of it is that we dislike
> duplicated cleanup even more, but with talloc it is often just a single
> talloc_free() that is required. 
>
> This patch seems to add a goto done to simply 'return ret', which seems
> a little gratuitous. 
>
> Andrew Bartlett
>
>   



More information about the samba-technical mailing list