Skip to contentSkip to conversation

ppc_oldworld: fix kernel_size and initrd_size sign

PATCH New François Revol 1 participant 1 message Jan 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc_oldworld: fix kernel_size and initrd_size sign

both variables are declared unsigned but checked for < 0 in various places.
This ensures the fallbacks work.

François.

ppc_oldworld.c (copie de travail) renamed from ppc_oldworld.c (révision 6368) +0 -0
Index: hw/ppc_oldworld.c
===================================================================
@@ -121,7 +121,8 @@
     m48t59_t *m48t59;
     int linux_boot, i;
     ram_addr_t ram_offset, vga_ram_offset, bios_offset,

vga_bios_offset;

-    uint32_t kernel_base, kernel_size, initrd_base, initrd_size;
+    uint32_t kernel_base, initrd_base;
+    int32_t kernel_size, initrd_size;
     PCIBus *pci_bus;
     MacIONVRAMState *nvr;
     int vga_bios_size, bios_size;