Skip to contentSkip to conversation

hw/i386/pc_q35.c: Avoid g_assert_cmpint() as it is not in glib 2.12

PATCH In review Peter Maydell 2 participants 3 messages Oct 17, 2014 – Oct 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/i386/pc_q35.c: Avoid g_assert_cmpint() as it is not in glib 2.12

The function g_assert_cmpint() is not in glib 2.12, which is our current minimum requirement. Rephrase the recently added assertion to avoid it.

---
 hw/i386/pc_q35.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc_q35.c +1 -1
index bb0dc8e..e225c6d 100644
@@ -254,7 +254,7 @@ static void pc_q35_init(MachineState *machine)
                                            true, "ich9-ahci");
     idebus[0] = qdev_get_child_bus(&ahci->qdev, "ide.0");
     idebus[1] = qdev_get_child_bus(&ahci->qdev, "ide.1");
-    g_assert_cmpint(MAX_SATA_PORTS, ==, ICH_AHCI(ahci)->ahci.ports);
+    g_assert(MAX_SATA_PORTS == ICH_AHCI(ahci)->ahci.ports);
     ide_drive_get(hd, ICH_AHCI(ahci)->ahci.ports);
     ahci_ide_create_devs(ahci, hd);
 
Signature · 1 line
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines

Subject: [Qemu-devel] [PATCH] hw/i386/pc_q35.c: Avoid g_assert_cmpint() as it is not in glib 2.12

The function g_assert_cmpint() is not in glib 2.12, which is our current minimum requirement. Rephrase the recently added assertion to avoid it.

---
 hw/i386/pc_q35.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Best regards,
-Gonglei

#2 lore raw
Quoted 6 lines · Gonglei
Quoted 6 lines

Subject: [Qemu-devel] [PATCH] hw/i386/pc_q35.c: Avoid g_assert_cmpint() as it is not in glib 2.12

The function g_assert_cmpint() is not in glib 2.12, which is our current minimum requirement. Rephrase the recently added assertion to avoid it.

Quoted 6 lines
Quoted 5 lines
---
 hw/i386/pc_q35.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks. Applied to master.

-- PMM