Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into st…
Browse files Browse the repository at this point in the history
…aging

* remotes/qmp-unstable/queue/qmp:
  qapi-types: add C99 index names to arrays
  monitor: Fix missing err = NULL in client_migrate_info()
  balloon: Fix typo
  hmp: Fix warning from smatch (wrong argument in function call)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Feb 26, 2015
2 parents 2559db0 + 912ae9c commit 041ccc9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions balloon.c
Expand Up @@ -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,
Expand Down Expand Up @@ -81,7 +81,7 @@ BalloonInfo *qmp_query_balloon(Error **errp)
{
BalloonInfo *info;

if (!have_ballon(errp)) {
if (!have_balloon(errp)) {
return NULL;
}

Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion hmp.c
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion monitor.c
Expand Up @@ -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;
}

Expand Down
11 changes: 7 additions & 4 deletions scripts/qapi-types.py
Expand Up @@ -123,16 +123,19 @@ def generate_enum_lookup(name, values):
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):
Expand Down

0 comments on commit 041ccc9

Please sign in to comment.