Drop superfluous conditionals around qemu_opts_del()
PATCH 1/1 Drop superfluous conditionals around qemu_opts_del()
Signed-off-by Markus Armbruster <[email protected]>
--- hw/core/qdev.c | 4 +--- qemu-char.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
hw/core/qdev.c +1 -3
@@ -1141,9 +1141,7 @@ static void device_finalize(Object *obj)NamedGPIOList *ngl, *next;DeviceState *dev =DEVICE (obj); -if (dev->opts) { -qemu_opts_del (dev->opts); - } +qemu_opts_del (dev->opts); QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {QLIST_REMOVE (ngl, node);
qemu-char.c +1 -3
@@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr) }g_free (chr->filename);g_free (chr->label); -if (chr->opts) { -qemu_opts_del (chr->opts); - } +qemu_opts_del (chr->opts);g_free (chr); }
Signature · 1 line
1.9.3
Quoted 27 lines · Markus Armbruster
Signed-off-by Markus Armbruster <[email protected]>--- hw/core/qdev.c | 4 +--- qemu-char.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)hw/core/qdev.c +1
-3@@ -1141,9 +1141,7 @@ static void device_finalize(Object *obj)NamedGPIOList *ngl, *next;DeviceState *dev =DEVICE (obj); -if (dev->opts) { -qemu_opts_del (dev->opts); - } +qemu_opts_del (dev->opts); QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {QLIST_REMOVE (ngl, node);qemu-char.c +0
-0
qemu-char.c void qemu_chr_delete(CharDriverState *chr) · line 3831
Quoted 10 lines
qemu-char.c +1
-3@@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr) }g_free (chr->filename);g_free (chr->label); -if (chr->opts) { -qemu_opts_del (chr->opts); - } +qemu_opts_del (chr->opts);g_free (chr); }
Reviewed-by Paolo Bonzini <[email protected]>
Quoted 6 lines · Markus Armbruster
Signed-off-by Markus Armbruster <[email protected]>--- hw/core/qdev.c | 4 +--- qemu-char.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
Reviewed-by Gonglei <[email protected]>
Quoted 30 lines
hw/core/qdev.c +1
-3@@ -1141,9 +1141,7 @@ static void device_finalize(Object *obj)NamedGPIOList *ngl, *next;DeviceState *dev =DEVICE (obj); -if (dev->opts) { -qemu_opts_del (dev->opts); - } +qemu_opts_del (dev->opts); QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {QLIST_REMOVE (ngl, node);qemu-char.c +1
-3@@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr) }g_free (chr->filename);g_free (chr->label); -if (chr->opts) { -qemu_opts_del (chr->opts); - } +qemu_opts_del (chr->opts);g_free (chr); }
Michael Tokarev
AppliedApplied to -trivial, thank you!
/mjt