[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hvmloader: Fix 22383:cba667fb80cf iterating over defns 0..255
# HG changeset patch # User Keir Fraser <keir@xxxxxxx> # Date 1289398523 0 # Node ID c19e3371f31b2b039f38026a225be266df151316 # Parent cba667fb80cfdadb8fb9da8b4224e116a12ec1b4 hvmloader: Fix 22383:cba667fb80cf iterating over defns 0..255 We need to declare devfn as wider than 8 bits for a loop 0<devfn<256 to terminate. Signed-off-by: Keir Fraser <keir@xxxxxxx> --- tools/firmware/hvmloader/hvmloader.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff -r cba667fb80cf -r c19e3371f31b tools/firmware/hvmloader/hvmloader.c --- a/tools/firmware/hvmloader/hvmloader.c Wed Nov 10 13:58:16 2010 +0000 +++ b/tools/firmware/hvmloader/hvmloader.c Wed Nov 10 14:15:23 2010 +0000 @@ -470,8 +470,7 @@ static int scan_option_rom( */ static int scan_etherboot_nic(uint32_t copy_rom_dest) { - uint8_t devfn; - uint16_t class, vendor_id, device_id; + uint16_t class, vendor_id, device_id, devfn; int rom_size = 0; for ( devfn = 0; (devfn < 256) && !rom_size; devfn++ ) @@ -498,8 +497,7 @@ static int pci_load_option_roms(uint32_t static int pci_load_option_roms(uint32_t rom_base_addr) { uint32_t option_rom_addr, rom_phys_addr = rom_base_addr; - uint16_t vendor_id, device_id; - uint8_t devfn, class; + uint16_t vendor_id, device_id, devfn, class; for ( devfn = 0; devfn < 256; devfn++ ) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |