[PATCH] ctdb-server: Remove one-line goto

Swen Schillig swen at vnet.ibm.com
Thu Mar 15 08:17:34 UTC 2018

On Thu, 2018-03-15 at 12:06 +1100, Martin Schwenke wrote:
> On Fri, 09 Mar 2018 09:15:38 +0100, Swen Schillig via samba-technical
> <samba-technical at lists.samba.org> wrote:
> > Please review and push if OK.
> I *think* this goes goes against the "Error and out logic" section of
> README.Coding.  I'm not sure because that section only has a single
> illustrative example.  So, I'm not sure whether an error-and-out with
> a
> goto to avoid a single line of code is better or worse than using an
> else.  ;-)
Hmmm, I believe the README.Coding wants to make sure that it is exited
sooner rather than later...no matter which technique is used to achieve
Here the "goto" is not any bit sooner/quicker but a lot "ugly'er".
> Does anyone else have an opinion?
> peace & happiness,
> martin

Besides, if-else-clauses are used in current code to branch between

More thoughts ?

Cheers Swen.

More information about the samba-technical mailing list