qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>
Subject: [Qemu-devel] [PATCH] multiboot: Use signed type for negative error numbers
Date: Wed, 18 Nov 2009 12:15:21 +0100	[thread overview]
Message-ID: <1258542921-776-1-git-send-email-kwolf@redhat.com> (raw)

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>
---
 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

             reply	other threads:[~2009-11-18 11:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18 11:15 Kevin Wolf [this message]
2009-12-04  9:54 ` [Qemu-devel] Patch mismerge (was: [PATCH] multiboot: Use signed type for negative error numbers) Kevin Wolf
2009-12-04 10:11   ` [Qemu-devel] Patch mismerge Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1258542921-776-1-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).