[PATCH 01/11] qom: Reduce use of error_propagate()
Markus Armbruster
armbru at redhat.com
Fri Sep 24 14:04:10 UTC 2021
Kevin Wolf <kwolf at redhat.com> writes:
> ERRP_GUARD() makes debugging easier by making sure that &error_abort
> still fails at the real origin of the error instead of
> error_propagate().
>
> Signed-off-by: Kevin Wolf <kwolf at redhat.com>
Yes.
The code you patch uses error_propagate() to work around functions not
returning distinct error values. error.h's big comment recommends such
return values, but recommendations don't update code, patches do.
Until then, ERRP_GUARD() is clearly a better crutch than
error_propagate().
Reviewed-by: Markus Armbruster <armbru at redhat.com>
More information about the libvir-list
mailing list