Patchwork [14/14] load_multiboot(): get_image_size() returns int

login
register
mail settings
Submitter Jes Sorensen
Date Aug. 30, 2010, 3:35 p.m.
Message ID <1283182547-26116-15-git-send-email-Jes.Sorensen@redhat.com>
Download mbox | patch
Permalink /patch/63064/
State New
Headers show

Comments

Jes Sorensen - Aug. 30, 2010, 3:35 p.m.
From: Jes Sorensen <Jes.Sorensen@redhat.com>

Do not store return of get_image_size() in a uint32_t as it makes it
impossible to detect error returns from get_image_size.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 hw/multiboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/multiboot.c b/hw/multiboot.c
index dc980e6..f9097a2 100644
--- a/hw/multiboot.c
+++ b/hw/multiboot.c
@@ -252,7 +252,7 @@  int load_multiboot(void *fw_cfg,
 
         do {
             char *next_space;
-            uint32_t mb_mod_length;
+            int mb_mod_length;
             uint32_t offs = mbs.mb_buf_size;
 
             next_initrd = strchr(initrd_filename, ',');