mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hmp: drop Error pointer indirection in hmp_handle_error
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 <vsementsov@virtuozzo.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191205174635.18758-5-vsementsov@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
committed by
Markus Armbruster
parent
49fbc7236d
commit
187c614767
@@ -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;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict)
|
||||
|
||||
qmp_dump_guest_memory(paging, prot, true, detach, has_begin, begin,
|
||||
has_length, length, true, dump_format, &err);
|
||||
hmp_handle_error(mon, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
g_free(prot);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void hmp_cpu_add(Monitor *mon, const QDict *qdict)
|
||||
|
||||
cpuid = qdict_get_int(qdict, "id");
|
||||
qmp_cpu_add(cpuid, &err);
|
||||
hmp_handle_error(mon, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
}
|
||||
|
||||
void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict)
|
||||
@@ -66,7 +66,7 @@ void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict)
|
||||
CpuInstanceProperties *c;
|
||||
|
||||
if (err != NULL) {
|
||||
hmp_handle_error(mon, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)
|
||||
monitor_printf(mon, "\n");
|
||||
|
||||
qapi_free_MemdevList(memdev_list);
|
||||
hmp_handle_error(mon, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
}
|
||||
|
||||
void hmp_info_numa(Monitor *mon, const QDict *qdict)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "qemu/readline.h"
|
||||
|
||||
void hmp_handle_error(Monitor *mon, Error **errp);
|
||||
void hmp_handle_error(Monitor *mon, Error *err);
|
||||
|
||||
void hmp_info_name(Monitor *mon, const QDict *qdict);
|
||||
void hmp_info_version(Monitor *mon, const QDict *qdict);
|
||||
|
||||
+77
-78
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -890,7 +890,7 @@ void hmp_device_add(Monitor *mon, const QDict *qdict)
|
||||
Error *err = NULL;
|
||||
|
||||
qmp_device_add((QDict *)qdict, NULL, &err);
|
||||
hmp_handle_error(mon, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
}
|
||||
|
||||
void hmp_device_del(Monitor *mon, const QDict *qdict)
|
||||
@@ -899,7 +899,7 @@ void hmp_device_del(Monitor *mon, const QDict *qdict)
|
||||
Error *err = NULL;
|
||||
|
||||
qmp_device_del(id, &err);
|
||||
hmp_handle_error(mon, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
}
|
||||
|
||||
BlockBackend *blk_by_qdev_id(const char *id, Error **errp)
|
||||
|
||||
+2
-2
@@ -37,7 +37,7 @@ void hmp_qom_list(Monitor *mon, const QDict *qdict)
|
||||
}
|
||||
qapi_free_ObjectPropertyInfoList(start);
|
||||
}
|
||||
hmp_handle_error(mon, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
}
|
||||
|
||||
void hmp_qom_set(Monitor *mon, const QDict *qdict)
|
||||
@@ -59,7 +59,7 @@ void hmp_qom_set(Monitor *mon, const QDict *qdict)
|
||||
}
|
||||
object_property_parse(obj, value, property, &err);
|
||||
}
|
||||
hmp_handle_error(mon, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
}
|
||||
|
||||
typedef struct QOMCompositionState {
|
||||
|
||||
Reference in New Issue
Block a user