It only returns 0 or 1 anyway, let's be realistic Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/conf/virnodedeviceobj.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 49f4f436b8..7db8fccbc3 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -120,7 +120,7 @@ virNodeDeviceObjGetDef(virNodeDeviceObjPtr obj) } -static int +static bool virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, const char *cap) { @@ -134,13 +134,13 @@ virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, while (caps) { if (STREQ(cap, virNodeDevCapTypeToString(caps->data.type))) { - return 1; + return true; } else { switch (caps->data.type) { case VIR_NODE_DEV_CAP_PCI_DEV: if ((STREQ(cap, mdev_types)) && (caps->data.pci_dev.flags & VIR_NODE_DEV_CAP_FLAG_PCI_MDEV)) - return 1; + return true; break; case VIR_NODE_DEV_CAP_SCSI_HOST: @@ -148,7 +148,7 @@ virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, (caps->data.scsi_host.flags & VIR_NODE_DEV_CAP_FLAG_HBA_FC_HOST)) || (STREQ(cap, vports_cap) && (caps->data.scsi_host.flags & VIR_NODE_DEV_CAP_FLAG_HBA_VPORT_OPS))) - return 1; + return true; break; case VIR_NODE_DEV_CAP_SYSTEM: @@ -172,7 +172,7 @@ virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, caps = caps->next; } - return 0; + return false; } -- 2.13.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list