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>
This commit is contained in:
parent
e13632a939
commit
50759ed4ff
|
@ -309,7 +309,7 @@ int set_option_from_string(const struct nvram_accessor *nvram, struct cb_cmos_op
|
||||||
switch (cmos_entry->config) {
|
switch (cmos_entry->config) {
|
||||||
case 'h':
|
case 'h':
|
||||||
/* only works on little endian */
|
/* only works on little endian */
|
||||||
raw = malloc(8);
|
raw = malloc(sizeof(u64));
|
||||||
*(u64*)raw = strtoull(value, NULL, 0);
|
*(u64*)raw = strtoull(value, NULL, 0);
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
|
Loading…
Reference in New Issue