From: Kevin Wolf Date: Wed, 18 Nov 2009 11:15:21 +0000 (+0100) Subject: multiboot: Use signed type for negative error numbers X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5f370b14639370b1e010fac5b1fd094e502a781e;p=qemu.git multiboot: Use signed type for negative error numbers 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 Signed-off-by: Anthony Liguori --- diff --git a/hw/pc.c b/hw/pc.c index dac01ce575..8c1b7ea575 100644 --- 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';