mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxc: simplify error handling in meminit_hvm
The hunk that prints out error message can only be reached from the loop that allocates memory. Move that hunk into the loop to avoid confusing gcc. Reported-by: Doug Goldstein <cardoe@cardoe.com> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Doug Goldstein <cardoe@cardoe.com> Acked-by: Roger Pau Monne <roger.pau@citrix.com>
This commit is contained in:
1 parent
f233dd6bcd
commit
ae3c165b81
1 file changed
+4
-7
@@ -1550,13 +1550,10 @@ static int meminit_hvm(struct xc_dom_image *dom)
|
||||
}
|
||||
|
||||
if ( rc != 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( rc != 0 )
|
||||
{
|
||||
DOMPRINTF("Could not allocate memory for HVM guest.");
|
||||
goto error_out;
|
||||
{
|
||||
DOMPRINTF("Could not allocate memory for HVM guest.");
|
||||
goto error_out;
|
||||
}
|
||||
}
|
||||
|
||||
DPRINTF("PHYSICAL MEMORY ALLOCATION:\n");
|
||||
|
||||