error: Move ERRP_GUARD() to the beginning of the function

include/qapi/error.h advises to put ERRP_GUARD() right at the
beginning of the function, because only then can it guard the whole
function.  Clean up the few spots disregarding the advice.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221121085054.683122-4-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
Markus Armbruster 2022-11-21 09:50:47 +01:00
parent 740d6c4eba
commit 05e385d2a9
5 changed files with 6 additions and 8 deletions

View file

@ -155,8 +155,8 @@ static void iothread_init_gcontext(IOThread *iothread)
static void iothread_set_aio_context_params(EventLoopBase *base, Error **errp)
{
IOThread *iothread = IOTHREAD(base);
ERRP_GUARD();
IOThread *iothread = IOTHREAD(base);
if (!iothread->ctx) {
return;