add_assigned_device() returns a pointer, so don't check the return value is less than zero.
Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/ipf.c | 2 +- qemu/hw/pc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c index 37f2de7..c0ac9eb 100644 --- a/qemu/hw/ipf.c +++ b/qemu/hw/ipf.c @@ -650,7 +650,7 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size, if (kvm_enabled()) { int i; for (i = 0; i < assigned_devices_index; i++) { - if (add_assigned_device(assigned_devices[i]) < 0) { + if (!add_assigned_device(assigned_devices[i])) { fprintf(stderr, "Warning: could not add assigned device %s\n", assigned_devices[i]); } diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c index 7d296c4..6f3339f 100644 --- a/qemu/hw/pc.c +++ b/qemu/hw/pc.c @@ -1187,7 +1187,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, if (kvm_enabled()) { int i; for (i = 0; i < assigned_devices_index; i++) { - if (add_assigned_device(assigned_devices[i]) < 0) { + if (!add_assigned_device(assigned_devices[i])) { fprintf(stderr, "Warning: could not add assigned device %s\n", assigned_devices[i]); } -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html