[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] multiboot: Use signed type for negative error numbe

From: Kevin Wolf
Subject: [Qemu-devel] [PATCH] multiboot: Use signed type for negative error numbers
Date: Wed, 18 Nov 2009 12:15:21 +0100

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 <address@hidden>
 hw/pc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 7c791c4..cb3b6c9 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -619,7 +619,7 @@ static int load_multiboot(void *fw_cfg,
         uint32_t mb_mod_info = 0x100;
         uint32_t mb_mod_cmdline = 0x300;
         uint32_t mb_mod_start = mh_load_addr;
-        uint32_t mb_mod_length = mb_kernel_size;
+        int mb_mod_length = mb_kernel_size;
         char *next_initrd;
         char *next_space;
         int mb_mod_count = 0;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]