[libvirt] [PATCH] Fix typo in qemudDomainAttachHostPciDevice()

Daniel Veillard veillard at redhat.com
Mon Dec 21 11:34:25 UTC 2009


On Mon, Dec 21, 2009 at 11:47:54AM +0100, Jiri Denemark wrote:
> The 'if' statement is supposed to check return value of
>     pci = pciGetDevice(conn, ...);
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_driver.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 890aa84..60dea9c 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -5290,7 +5290,7 @@ static int qemudDomainAttachHostPciDevice(virConnectPtr conn,
>                         hostdev->source.subsys.u.pci.bus,
>                         hostdev->source.subsys.u.pci.slot,
>                         hostdev->source.subsys.u.pci.function);
> -    if (!dev)
> +    if (!pci)
>          return -1;
>  
>      if ((hostdev->managed && pciDettachDevice(conn, pci) < 0) ||

  Ah, right, good catch, fixed and pushed,

    thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list