On Wed, Apr 15, 2020 at 1:08 PM Yann Ylavic <[email protected]> wrote:
>
> On Wed, Apr 15, 2020 at 10:11 AM Stefan Eissing
> <[email protected]> wrote:
> >
> > Obviously, I nowadays prefer the goto/single exit style myself, but the 
> > rest of the module is different.
>
> +1, cleanup in each early return is easier to get wrong IMHO.
> In your patch I'd rename the "leave" label to "cleanup" though, to
> make it clear why the goto is needed (but also because adding a naming
> discussion to a style one is fun :) ).

In this particular patch, setting "rv" and using a single label may be
an option too. Something like this for each goto:
   rv = 0|1;
   goto cleanup;
?

Reply via email to