libpayload: code cosmetics
authorMathias Krause <mathias.krause@secunet.com>
Wed, 8 Feb 2012 09:32:57 +0000 (10:32 +0100)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Mon, 13 Feb 2012 20:54:21 +0000 (21:54 +0100)
Be consistend with coding style at least within a function -- don't mix
sizeof with plain values.

Change-Id: Iefb5b7fe4f54977f5505fc9cea65c9c4af3e7f3a
Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Reviewed-on: http://review.coreboot.org/617
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
payloads/libpayload/drivers/options.c

index 8161c22e12898cf151861fa20815beacb3e708f3..7c762516f52e341045c753b3a65353be83c13784 100644 (file)
@@ -309,7 +309,7 @@ int set_option_from_string(const struct nvram_accessor *nvram, struct cb_cmos_op
        switch (cmos_entry->config) {
                case 'h':
                        /* only works on little endian */
        switch (cmos_entry->config) {
                case 'h':
                        /* only works on little endian */
-                       raw = malloc(8);
+                       raw = malloc(sizeof(u64));
                        *(u64*)raw = strtoull(value, NULL, 0);
                        break;
                case 's':
                        *(u64*)raw = strtoull(value, NULL, 0);
                        break;
                case 's':