From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAiWY-0008AD-1r for qemu-devel@nongnu.org; Wed, 18 Nov 2009 06:16:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAiWS-00087K-Ah for qemu-devel@nongnu.org; Wed, 18 Nov 2009 06:16:33 -0500 Received: from [199.232.76.173] (port=48378 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAiWS-000873-1t for qemu-devel@nongnu.org; Wed, 18 Nov 2009 06:16:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29660) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NAiWR-0002Ei-N6 for qemu-devel@nongnu.org; Wed, 18 Nov 2009 06:16:27 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAIBGQF7009110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 18 Nov 2009 06:16:27 -0500 From: Kevin Wolf Date: Wed, 18 Nov 2009 12:15:21 +0100 Message-Id: <1258542921-776-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH] multiboot: Use signed type for negative error numbers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf 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 --- 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; -- 1.6.2.5