summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Krause <mathias.krause@secunet.com>2012-02-08 10:32:57 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-02-13 21:54:21 +0100
commit50759ed4ff438db6f3b093984fbb79d6445ebcb3 (patch)
treee3102bb19ba1dd005c100a5263251f684d9f5726
parente13632a939e7dde8d7d44fc73e73a41dae8060c3 (diff)
downloadcoreboot-50759ed4ff438db6f3b093984fbb79d6445ebcb3.tar.xz
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@secunet.com> Reviewed-on: http://review.coreboot.org/617 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--payloads/libpayload/drivers/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c
index 8161c22e12..7c762516f5 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);
break;
case 's':