Message ID | 1459943163-18697-4-git-send-email-paulinaszubarczyk@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 2016-04-06 at 13:45 +0200, Paulina Szubarczyk wrote: > Return rc value instead of always 0. > I'd say "Propagate the error, insetad of always returning 0", but yeah, this is nitpicking! :-P Also, not my call, but I'd include this change inside of patch 1: both are simple enough that they can be made one, IMO (mentioning this new thing being done in the changelog of the resulting patch, of course). > --- a/tools/libxl/libxl_pci.c > +++ b/tools/libxl/libxl_pci.c > @@ -1602,7 +1602,7 @@ int libxl__device_pci_destroy_all(libxl__gc > *gc, uint32_t domid) > } > While you're here, libxl conding style says that the 'int rc' variable used to host libxl error codes, and if necessary, to return them, should not be initialized, while this function does it. Again not my call, but I think you can get rid of the initialization too (and just assign 0 to it before the loop). Regards, Dario
diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 8549378..b667dba 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -1602,7 +1602,7 @@ int libxl__device_pci_destroy_all(libxl__gc *gc, uint32_t domid) } free(pcidevs); - return 0; + return rc; } int libxl__grant_vga_iomem_permission(libxl__gc *gc, const uint32_t domid,