runstate: Initialize Error * to NULL
PATCH 1/1 runstate: Initialize Error * to NULL
Based on the description of error_setg(), the local variable err in qemu_init_subsystems() should be initialized to NULL.
Fix: efd7ab22fb "vl: extract qemu_init_subsystems"
---
The patch is generated by the following coccinelle script (thanks to Markus):
@ r @
identifier id;
@@
(
static Error *id;
|
Error *id
+ = NULL
;
)
And exclude the modifications in softmmu/vl.c (which has fixed by Zhenzhong Duan already) and util/error.c (which are unnecessary).
softmmu/runstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
softmmu/runstate.c +1 -1
@@ -746,7 +746,7 @@ static void qemu_run_exit_notifiers(void)void qemu_init_subsystems (void ) { -Error *err; +Error *err =NULL ;os_set_line_buffering ();
Signature · 1 line
2.31.1
Quoted 21 lines · Peng Liang
Based on the description of
error_setg(), the local variable err inqemu_init_subsystems()should be initialized to NULL.Fix:
efd7ab22fb"vl: extractqemu_init_subsystems"Signed-off-by Peng Liang <[email protected]>---
The patch is generated by the following coccinelle script (thanks to Markus):
@ r @
identifier id;
@@
(
static Error *id;
|
Error *id
+ = NULL
;
)
And exclude the modifications insoftmmu/vl.c(which has fixed by Zhenzhong Duan already) andutil/error.c(which are unnecessary).
Quoted 2 lines
softmmu/runstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Paolo Bonzini
AppliedQuoted 30 lines · Peng Liang
Based on the description of
error_setg(), the local variable err inqemu_init_subsystems()should be initialized to NULL.Fix:
efd7ab22fb"vl: extractqemu_init_subsystems"Signed-off-by Peng Liang <[email protected]>---
The patch is generated by the following coccinelle script (thanks to Markus):
@ r @
identifier id;
@@
(
static Error *id;
|
Error *id
+ = NULL
;
)
And exclude the modifications insoftmmu/vl.c(which has fixed by Zhenzhong Duan already) andutil/error.c(which are unnecessary).softmmu/runstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)softmmu/runstate.c +0
-0
softmmu/runstate.c static void qemu_run_exit_notifiers(void) · line 752
Quoted 8 lines
softmmu/runstate.c +1
-1@@ -746,7 +746,7 @@ static void qemu_run_exit_notifiers(void)void qemu_init_subsystems (void ) { -Error *err; +Error *err =NULL ;os_set_line_buffering ();
Queued, thanks.
Paolo