mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
error: Move ERRP_GUARD() to the beginning of the function
Since the commit05e385d2a9
("error: Move ERRP_GUARD() to the beginning of the function"), there are new codes that don't put ERRP_GUARD() at the beginning of the functions. As stated in the commit05e385d2a9
: "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.", so clean up the few spots disregarding the advice. Inspired-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240312060337.3240965-1-zhao1.liu@linux.intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
95e9053a34
commit
46ff64a826
6 changed files with 9 additions and 10 deletions
|
@ -312,9 +312,9 @@ static void ccw_init(MachineState *machine)
|
|||
static void s390_cpu_plug(HotplugHandler *hotplug_dev,
|
||||
DeviceState *dev, Error **errp)
|
||||
{
|
||||
ERRP_GUARD();
|
||||
MachineState *ms = MACHINE(hotplug_dev);
|
||||
S390CPU *cpu = S390_CPU(dev);
|
||||
ERRP_GUARD();
|
||||
|
||||
g_assert(!ms->possible_cpus->cpus[cpu->env.core_id].cpu);
|
||||
ms->possible_cpus->cpus[cpu->env.core_id].cpu = OBJECT(dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue