]> git.proxmox.com Git - qemu.git/commitdiff
multiboot: Use signed type for negative error numbers
authorKevin Wolf <kwolf@redhat.com>
Wed, 18 Nov 2009 11:15:21 +0000 (12:15 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 3 Dec 2009 21:26:00 +0000 (15:26 -0600)
In mb_mod_length a return value is stored that is negative in error case. With
an unsigned type the check goes wrong.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pc.c

diff --git a/hw/pc.c b/hw/pc.c
index dac01ce57515c90080b45fd13c0b9421b5889f60..8c1b7ea57583a0ff4ac7dfbcaadcfe7df24cf380 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -634,6 +634,7 @@ static int load_multiboot(void *fw_cfg,
                 printf("WARNING: Too many modules loaded, aborting.\n");
                 break;
             }
+
             next_initrd = strchr(initrd_filename, ',');
             if (next_initrd)
                 *next_initrd = '\0';