[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v9 18/37] qapi: Drop unused error arg
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v9 18/37] qapi: Drop unused error argument for list and implicit struct |
Date: |
Wed, 20 Jan 2016 20:03:17 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> No backend was setting an error when ending the visit of a list
> or implicit struct.
That's a lie: qmp_input_end_list() does. But it shouldn't, as you
explain below. Rephrase the commit message?
> Make the callers a bit easier to follow by
> making this a part of the contract, and removing the errp
> argument - callers can then unconditionally end an object as
> part of cleanup without having to think about whether a second
> error is dominated by a first, because there is no second error.
>
> The only addition of &error_abort in this patch, in the function
> qmp_input_end_list(), will never trigger unless a programming
> bug creates a push(struct)/pop(list) or push(list)/pop(struct)
> mismatch.
>
> A later patch will then tackle the larger task of splitting
> visit_end_struct(), which can indeed set an error (and that
> cleanup will also have the side-effect of removing the use of
> error_abort added here).
>
> Signed-off-by: Eric Blake <address@hidden>
> Reviewed-by: Marc-André Lureau <address@hidden>
Patch looks good. I like the simplification.