mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
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:
@ -554,12 +554,11 @@ static void machine_get_mem(Object *obj, Visitor *v, const char *name,
|
||||
static void machine_set_mem(Object *obj, Visitor *v, const char *name,
|
||||
void *opaque, Error **errp)
|
||||
{
|
||||
ERRP_GUARD();
|
||||
MachineState *ms = MACHINE(obj);
|
||||
MachineClass *mc = MACHINE_GET_CLASS(obj);
|
||||
MemorySizeConfiguration *mem;
|
||||
|
||||
ERRP_GUARD();
|
||||
|
||||
if (!visit_type_MemorySizeConfiguration(v, name, &mem, errp)) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user