[dm-crypt] goto patch for cryptsetup?

.. ink .. mhogomchungu at gmail.com
Fri Mar 7 13:16:44 CET 2014


On Fri, Mar 7, 2014 at 5:52 AM, Lars Winterfeld <
lars.winterfeld at tu-ilmenau.de> wrote:



> The second alternative would be to introduce a new function like
>
> int foo_failed(struct bar* p) {
>         // clean p
>         return -1;
> }
>
> and then inside the "int foo()":
> if(a) return foo_failed(p);
> instead of
> if(a) goto fail;
>
>
>
i prefer to fo it this way,example[1]:

[1]
https://raw.github.com/mhogomchungu/zuluCrypt/master/zuluCrypt-cli/lib/open_tcrypt.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20140307/1855c42a/attachment.html>


More information about the dm-crypt mailing list