]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
pci.c: correct an erroneous expression
authorJim Meyering <meyering@redhat.com>
Tue, 26 Jan 2010 19:36:58 +0000 (20:36 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 27 Jan 2010 07:10:06 +0000 (08:10 +0100)
* src/util/pci.c (pciDeviceDownstreamLacksACS): Fix a typo
that rendered a subexpression always false.

src/util/pci.c

index 09535bdb38e27406cccd6f3d2cefe9e6c34d273d..02748062ef5b488211fb453ae8cdfa6f131f6c10 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Red Hat, Inc.
+ * Copyright (C) 2009-2010 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -1266,7 +1266,7 @@ pciDeviceDownstreamLacksACS(virConnectPtr conn,
         return -1;
 
     pos = dev->pcie_cap_pos;
-    if (!pos || !pciRead16(dev, PCI_CLASS_DEVICE) == PCI_CLASS_BRIDGE_PCI)
+    if (!pos || pciRead16(dev, PCI_CLASS_DEVICE) != PCI_CLASS_BRIDGE_PCI)
         return 0;
 
     flags = pciRead16(dev, pos + PCI_EXP_FLAGS);