[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [libvirt-glib][PATCH] test-domain-create: Don't shadow global variable



On Tue, Apr 24, 2012 at 02:03:15PM +0200, Michal Privoznik wrote:
> In function create_usb_controller variable 'index' shadows a global
> declaration.
> ---
>  libvirt-gconfig/tests/test-domain-create.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c
> index 699c255..00bd620 100644
> --- a/libvirt-gconfig/tests/test-domain-create.c
> +++ b/libvirt-gconfig/tests/test-domain-create.c
> @@ -45,7 +45,7 @@ const char *features[] = { "foo", "bar", "baz", NULL };
>  
>  
>  static GVirConfigDomainControllerUsb *
> -create_usb_controller(GVirConfigDomainControllerUsbModel model, guint index,
> +create_usb_controller(GVirConfigDomainControllerUsbModel model, guint indx,
>                        GVirConfigDomainControllerUsb *master, guint start_port,
>                        guint domain, guint bus, guint slot, guint function,
>                        gboolean multifunction)
> @@ -55,7 +55,7 @@ create_usb_controller(GVirConfigDomainControllerUsbModel model, guint index,
>  
>      controller = gvir_config_domain_controller_usb_new();
>      gvir_config_domain_controller_usb_set_model(controller, model);
> -    gvir_config_domain_controller_set_index(GVIR_CONFIG_DOMAIN_CONTROLLER(controller), index);
> +    gvir_config_domain_controller_set_index(GVIR_CONFIG_DOMAIN_CONTROLLER(controller), indx);
>      if (master)
>          gvir_config_domain_controller_usb_set_master(controller, master, start_port);
>      address = gvir_config_domain_address_pci_new();

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]