diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/isa-bus.c | 6 | ||||
-rw-r--r-- | hw/qdev-properties.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c index 85ba35494..2843b5132 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -137,10 +137,12 @@ ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2 isa->iobase[0] = iobase; isa->iobase[1] = iobase2; qdev_init(dev); - if (-1 != irq) + if (irq != -1) { isa_connect_irq(isa, 0, irq); - if (-1 != irq2) + } + if (irq2 != -1) { isa_connect_irq(isa, 1, irq2); + } return isa; } diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index c9703c261..12ff46bf0 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -273,7 +273,7 @@ static int print_pci_devfn(DeviceState *dev, Property *prop, char *dest, size_t { uint32_t *ptr = qdev_get_prop_ptr(dev, prop); - if (-1 == *ptr) { + if (*ptr == -1) { return snprintf(dest, len, "<unset>"); } else { return snprintf(dest, len, "%02x.%x", *ptr >> 3, *ptr & 7); |