* Eric Blake (ebl...@redhat.com) wrote: > On 10/11/19 11:03 AM, Vladimir Sementsov-Ogievskiy wrote: > > We don't need Error **, as all callers pass local Error object, which > > isn't used after the call. Use Error * instead. > > > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > > --- > > include/monitor/hmp.h | 2 +- > > dump/dump-hmp-cmds.c | 4 +- > > hw/core/machine-hmp-cmds.c | 6 +- > > monitor/hmp-cmds.c | 155 ++++++++++++++++++------------------- > > qdev-monitor.c | 4 +- > > qom/qom-hmp-cmds.c | 4 +- > > 6 files changed, 87 insertions(+), 88 deletions(-) > > > > > +++ b/dump/dump-hmp-cmds.c > > @@ -32,7 +32,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict > > *qdict) > > if (zlib + lzo + snappy + win_dmp > 1) { > > error_setg(&err, "only one of '-z|-l|-s|-w' can be set"); > > - hmp_handle_error(mon, &err); > > + hmp_handle_error(mon, err); > > return; > > } > > Probably not for this series, but would a patch to various HMP files to have > a g_auto() sort of reporting on an error the moment it goes out of scope > (rather than having to manually call hmp_handle_error() everywhere) make > sense?
Maybe; although lets be a bit careful just how much we hide behind g_auto. Dave > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization: qemu.org | libvirt.org -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK