summaryrefslogtreecommitdiff
path: root/util/nvramtool/cmos_ops.c
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2011-10-17 08:58:27 -0700
committerPatrick Georgi <patrick@georgi-clan.de>2011-10-22 10:33:26 +0200
commitc31c4de681738fc264333cb12aecdb995b119a94 (patch)
treef45523b5d45643b59372f68325004accff5b0329 /util/nvramtool/cmos_ops.c
parentd1bc331855caab351a70676b5085787292a45fea (diff)
downloadcoreboot-c31c4de681738fc264333cb12aecdb995b119a94.tar.xz
nvramtool: Fix CMOS checksum to match coreboot (and /dev/nvram)
Change-Id: I28b0dbad36403a31be83581107f40b3ca1332dcc Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/287 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'util/nvramtool/cmos_ops.c')
-rw-r--r--util/nvramtool/cmos_ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvramtool/cmos_ops.c b/util/nvramtool/cmos_ops.c
index 2bbc8a1df6..91c9f451ac 100644
--- a/util/nvramtool/cmos_ops.c
+++ b/util/nvramtool/cmos_ops.c
@@ -210,7 +210,7 @@ uint16_t cmos_checksum_compute(void)
for (i = cmos_checksum_start; i <= cmos_checksum_end; i++)
sum += cmos_read_byte(i);
- return ~((uint16_t) (sum & 0xffff));
+ return (uint16_t)(sum & 0xffff);
}
/****************************************************************************