From 5f370b14639370b1e010fac5b1fd094e502a781e Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 18 Nov 2009 12:15:21 +0100 Subject: [PATCH] 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 --- hw/pc.c | 1 + 1 file changed, 1 insertion(+) 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'; -- 2.30.2