mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
migration: Fix compiler warning ('caps' may be used uninitialized)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
ddd23638d7
commit
387eedebf6
@ -150,6 +150,7 @@ MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp)
|
||||
MigrationState *s = migrate_get_current();
|
||||
int i;
|
||||
|
||||
caps = NULL; /* silence compiler warning */
|
||||
for (i = 0; i < MIGRATION_CAPABILITY_MAX; i++) {
|
||||
if (head == NULL) {
|
||||
head = g_malloc0(sizeof(*caps));
|
||||
|
Loading…
Reference in New Issue
Block a user