[coreboot] New patch to review for coreboot: 26ddf1e libpayload: code cosmetics

Mathias Krause (mathias.krause@secunet.com) gerrit at coreboot.org
Fri Feb 10 11:40:50 CET 2012

Mathias Krause (mathias.krause at secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/617


commit 26ddf1e0580b4b31a4576760bdbe6f640eb8fd72
Author: Mathias Krause <mathias.krause at secunet.com>
Date:   Wed Feb 8 10:32:57 2012 +0100

    libpayload: code cosmetics
    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 at secunet.com>
 payloads/libpayload/drivers/options.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c
index 8161c22..7c76251 100644
--- a/payloads/libpayload/drivers/options.c
+++ b/payloads/libpayload/drivers/options.c
@@ -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 */
-			raw = malloc(8);
+			raw = malloc(sizeof(u64));
 			*(u64*)raw = strtoull(value, NULL, 0);
 		case 's':

More information about the coreboot mailing list