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>
}
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");