]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
xen/arm: Remove leading +1 when hypervisor compat property is created
authorJulien Grall <julien.grall@linaro.org>
Thu, 16 May 2013 22:34:11 +0000 (23:34 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 23 May 2013 10:35:04 +0000 (11:35 +0100)
When a static array with string is created, the size of this array contains
the \0.

This error was raised with gcc 4.7 because, the local variables are not always
initialized to 0.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen/arch/arm/domain_build.c

index 83690994a9a98d95153172ed2fece35e234615c5..b92c64bcd071acef3682c18906a799289ed2132f 100644 (file)
@@ -279,7 +279,7 @@ static void make_hypervisor_node(void *fdt, int addrcells, int sizecells)
     fdt_begin_node(fdt, "hypervisor");
 
     /* Cannot use fdt_property_string due to embedded nulls */
-    fdt_property(fdt, "compatible", compat, sizeof(compat) + 1);
+    fdt_property(fdt, "compatible", compat, sizeof(compat));
 
     /* reg 0 is grant table space */
     cell = &reg[0];