qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 11/25] nbd: ask and print error information from


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 11/25] nbd: ask and print error information from qemu-sockets
Date: Wed, 17 Oct 2012 16:53:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0

Il 17/10/2012 16:51, Markus Armbruster ha scritto:
>> >  /* Basic flow for negotiation
> The boilerplate pattern
> 
>     Error *local_err = NULL;
>     FOO(..., *local_err);
>     if (local_err) {
>         qerror_report_err(local_err);
>         error_free(local_err);
>     }
> 
> is spreading.  Not quite sure it's worth a macro.

Actually this should not spread, but this one should:

    Error *local_err = NULL;
    FOO(..., *local_err);
    if (local_err) {
        error_propagate(errp, local_err);
        return;
    }

Not quite sure how to macroize it though, at least without making the
code too ugly to see.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]