]> git.sur5r.net Git - u-boot/commitdiff
Fix a possible overflow case detected by gcc 4.3.2
authorEmil Medve <Emilian.Medve@Freescale.com>
Mon, 23 Feb 2009 16:43:36 +0000 (10:43 -0600)
committerGerald Van Baren <vanbaren@cideas.com>
Wed, 1 Apr 2009 23:29:39 +0000 (19:29 -0400)
.../dtc/libfdt/fdt_sw.c: In function 'fdt_end_node':
.../dtc/libfdt/fdt_sw.c:81: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
libfdt/fdt_sw.c

index 2380b27502c7e65a91219f5c019e5495ad58ada7..55ebebf1eb20e8c7f9200881f99ecf03632db9a3 100644 (file)
@@ -70,7 +70,7 @@ static int _fdt_sw_check_header(void *fdt)
                        return err; \
        }
 
-static void *_fdt_grab_space(void *fdt, int len)
+static void *_fdt_grab_space(void *fdt, size_t len)
 {
        int offset = fdt_size_dt_struct(fdt);
        int spaceleft;