libxl: build fix
PATCH 1/1 libxl: build fix
Hi!
Move variable defintion and usage to where it is actually used. Fixes build error about used initialized.
Signed-off-by Christoph Egger <[email protected]>
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
tools/libxl/libxl.c +2 -2
@@ -1256,7 +1256,6 @@ static char ** libxl_build_device_model_int num =0 , i;flexarray_t *dm_args;int nb; -libxl_device_disk *disks; dm_args =flexarray_make (16 ,1 );if (!dm_args)
@@ -1391,6 +1390,7 @@ static char ** libxl_build_device_model_flexarray_set (dm_args, num++,"xenfv" );if (info->type ==XENFV ) { +libxl_device_disk *disks; disks =libxl_device_disk_list (libxl__gc_owner (gc), info->domid, &nb);for (i; i < nb; i++) {if (disks[i].is_cdrom) {
@@ -1402,8 +1402,8 @@ static char ** libxl_build_device_model_ }libxl_device_disk_destroy (&disks[i]); } +free (disks); } -free (disks);flexarray_set (dm_args, num++,NULL );return (char **)flexarray_contents (dm_args); }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel