提交 73538c31 编写于 作者: B Blue Swirl

Suppress kraxelisms

Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 1387fe4a
...@@ -137,10 +137,12 @@ ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2 ...@@ -137,10 +137,12 @@ ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2
isa->iobase[0] = iobase; isa->iobase[0] = iobase;
isa->iobase[1] = iobase2; isa->iobase[1] = iobase2;
qdev_init(dev); qdev_init(dev);
if (-1 != irq) if (irq != -1) {
isa_connect_irq(isa, 0, irq); isa_connect_irq(isa, 0, irq);
if (-1 != irq2) }
if (irq2 != -1) {
isa_connect_irq(isa, 1, irq2); isa_connect_irq(isa, 1, irq2);
}
return isa; return isa;
} }
......
...@@ -273,7 +273,7 @@ static int print_pci_devfn(DeviceState *dev, Property *prop, char *dest, size_t ...@@ -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); uint32_t *ptr = qdev_get_prop_ptr(dev, prop);
if (-1 == *ptr) { if (*ptr == -1) {
return snprintf(dest, len, "<unset>"); return snprintf(dest, len, "<unset>");
} else { } else {
return snprintf(dest, len, "%02x.%x", *ptr >> 3, *ptr & 7); return snprintf(dest, len, "%02x.%x", *ptr >> 3, *ptr & 7);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册