aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--balloon.c6
-rw-r--r--hmp.c2
-rw-r--r--monitor.c3
-rw-r--r--scripts/qapi-types.py11
4 files changed, 13 insertions, 9 deletions
diff --git a/balloon.c b/balloon.c
index dea19a470a..70c00f5f84 100644
--- a/balloon.c
+++ b/balloon.c
@@ -36,7 +36,7 @@ static QEMUBalloonEvent *balloon_event_fn;
static QEMUBalloonStatus *balloon_stat_fn;
static void *balloon_opaque;
-static bool have_ballon(Error **errp)
+static bool have_balloon(Error **errp)
{
if (kvm_enabled() && !kvm_has_sync_mmu()) {
error_set(errp, ERROR_CLASS_KVM_MISSING_CAP,
@@ -81,7 +81,7 @@ BalloonInfo *qmp_query_balloon(Error **errp)
{
BalloonInfo *info;
- if (!have_ballon(errp)) {
+ if (!have_balloon(errp)) {
return NULL;
}
@@ -92,7 +92,7 @@ BalloonInfo *qmp_query_balloon(Error **errp)
void qmp_balloon(int64_t target, Error **errp)
{
- if (!have_ballon(errp)) {
+ if (!have_balloon(errp)) {
return;
}
diff --git a/hmp.c b/hmp.c
index 12064096b9..735097c03b 100644
--- a/hmp.c
+++ b/hmp.c
@@ -412,7 +412,7 @@ void hmp_info_block(Monitor *mon, const QDict *qdict)
/* Print BlockBackend information */
if (!nodes) {
- block_list = qmp_query_block(false);
+ block_list = qmp_query_block(NULL);
} else {
block_list = NULL;
}
diff --git a/monitor.c b/monitor.c
index 4f941e6d67..41900dad20 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1094,12 +1094,13 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
const char *subject = qdict_get_try_str(qdict, "cert-subject");
int port = qdict_get_try_int(qdict, "port", -1);
int tls_port = qdict_get_try_int(qdict, "tls-port", -1);
- Error *err;
+ Error *err = NULL;
int ret;
if (strcmp(protocol, "spice") == 0) {
if (!qemu_using_spice(&err)) {
qerror_report_err(err);
+ error_free(err);
return -1;
}
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 1eb272dd26..db872180c6 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -123,16 +123,19 @@ const char *%(name)s_lookup[] = {
name=name)
i = 0
for value in values:
+ index = generate_enum_full_value(name, value)
ret += mcgen('''
- "%(value)s",
+ [%(index)s] = "%(value)s",
''',
- value=value)
+ index = index, value = value)
+ max_index = generate_enum_full_value(name, 'MAX')
ret += mcgen('''
- NULL,
+ [%(max_index)s] = NULL,
};
-''')
+''',
+ max_index=max_index)
return ret
def generate_enum(name, values):