mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
qapi: A couple more QAPI_LIST_PREPEND() stragglers
Commit 54aa3de72e
switched multiple sites to use QAPI_LIST_PREPEND
instead of open-coding, but missed a couple of spots.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210113221013.390592-3-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
e9d635ea18
commit
240ee8bd31
2 changed files with 15 additions and 26 deletions
|
@ -104,17 +104,16 @@ VersionInfo *qmp_query_version(Error **errp)
|
|||
|
||||
static void query_commands_cb(const QmpCommand *cmd, void *opaque)
|
||||
{
|
||||
CommandInfoList *info, **list = opaque;
|
||||
CommandInfo *info;
|
||||
CommandInfoList **list = opaque;
|
||||
|
||||
if (!cmd->enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
info = g_malloc0(sizeof(*info));
|
||||
info->value = g_malloc0(sizeof(*info->value));
|
||||
info->value->name = g_strdup(cmd->name);
|
||||
info->next = *list;
|
||||
*list = info;
|
||||
info->name = g_strdup(cmd->name);
|
||||
QAPI_LIST_PREPEND(*list, info);
|
||||
}
|
||||
|
||||
CommandInfoList *qmp_query_commands(Error **errp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue