[Libvir] bug in xen_unified.c

Hi, spotted by gcc 4.3, in libvirt 0.4.0, xen_unified.c:xenUnifiedDomainSuspend() if (priv->opened[i] && which should probably be: if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] && because it is outside of the loop, and the other indices in that if (). --- src/xen_unified.c 2008/01/28 22:20:22 1.1 +++ src/xen_unified.c 2008/01/28 22:20:26 @@ -699,7 +699,7 @@ drivers[i]->domainDestroy (dom) == 0) return 0; - if (priv->opened[i] && + if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] && drivers[XEN_UNIFIED_HYPERVISOR_OFFSET]->domainDestroy && drivers[XEN_UNIFIED_HYPERVISOR_OFFSET]->domainDestroy (dom) == 0) return 0; Ciao, Marcus -- Working, but not speaking, for the following german company: SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)

On Mon, Jan 28, 2008 at 11:25:12PM +0100, Marcus Meissner wrote:
Hi,
spotted by gcc 4.3, in libvirt 0.4.0, xen_unified.c:xenUnifiedDomainSuspend()
if (priv->opened[i] && which should probably be: if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] && because it is outside of the loop, and the other indices in that if ().
Oops, yup clearly a bug, applied and commited, thanks Marcus ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hey DV, On Tue, 2008-01-29 at 05:51 -0500, Daniel Veillard wrote:
On Mon, Jan 28, 2008 at 11:25:12PM +0100, Marcus Meissner wrote:
Hi,
spotted by gcc 4.3, in libvirt 0.4.0, xen_unified.c:xenUnifiedDomainSuspend()
if (priv->opened[i] && which should probably be: if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] && because it is outside of the loop, and the other indices in that if ().
Oops, yup clearly a bug, applied and commited,
I think you forgot to commit this one - I sent the patch again yesterday before seeing this mail. Cheers, Mark.

On Thu, Feb 07, 2008 at 08:03:48AM +0000, Mark McLoughlin wrote:
Hey DV,
On Tue, 2008-01-29 at 05:51 -0500, Daniel Veillard wrote:
On Mon, Jan 28, 2008 at 11:25:12PM +0100, Marcus Meissner wrote:
Hi,
spotted by gcc 4.3, in libvirt 0.4.0, xen_unified.c:xenUnifiedDomainSuspend()
if (priv->opened[i] && which should probably be: if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] && because it is outside of the loop, and the other indices in that if ().
Oops, yup clearly a bug, applied and commited,
I think you forgot to commit this one - I sent the patch again yesterday before seeing this mail.
Oops, yes it was still sitting on my laptop tree with the ChangeLog uncommited. Strange usually I send the mail after the commit, maybe I got distrated on the Red Hat booth while doing this last week ... Commited for good now, thanks :-) ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (3)
-
Daniel Veillard
-
Marcus Meissner
-
Mark McLoughlin