Skip to content

Commit

Permalink
migration: Fix compiler warning ('caps' may be used uninitialized)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Tokarev <[email protected]>
Reviewed-by: Stefan Weil <[email protected]>
  • Loading branch information
Michael Tokarev committed Oct 5, 2013
1 parent ddd2363 commit 387eede
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions migration.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 387eede

Please sign in to comment.