libxc: simplify error handling in meminit_hvm
PATCH 1/1 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.
---
Cc: Ian Jackson <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Roger Pau Monne <[email protected]>
--- tools/libxc/xc_dom_x86.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
tools/libxc/xc_dom_x86.c +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" );
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 7 lines · Wei Liu
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 <[email protected]>Signed-off-by Wei Liu <[email protected]>---
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Wei Liu
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 <[email protected]>Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel