From 14e22779625de673569c7b950ecc2753fb915b31 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 27 Apr 2010 06:56:47 +0000 Subject: Since some people disapprove of white space cleanups mixed in regular commits while others dislike them being extra commits, let's clean them up once and for all for the existing code. If it's ugly, let it only be ugly once :-) Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5507 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/nvramtool/cmos_lowlevel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/nvramtool/cmos_lowlevel.c') diff --git a/util/nvramtool/cmos_lowlevel.c b/util/nvramtool/cmos_lowlevel.c index 67d561b26761..ecfc99b74f28 100644 --- a/util/nvramtool/cmos_lowlevel.c +++ b/util/nvramtool/cmos_lowlevel.c @@ -75,7 +75,7 @@ static inline unsigned char get_bits(unsigned long long value, unsigned bit, static inline void put_bits(unsigned char value, unsigned bit, unsigned nr_bits, unsigned long long *result) { - *result += ((unsigned long long)(value & + *result += ((unsigned long long)(value & ((unsigned char)((1 << nr_bits) - 1)))) << bit; } @@ -161,7 +161,7 @@ void cmos_write(const cmos_entry_t * e, unsigned long long value) } else { for (next_bit = 0, bits_left = length; bits_left; next_bit += nr_bits, bits_left -= nr_bits) { - nr_bits = cmos_bit_op_strategy(bit + next_bit, + nr_bits = cmos_bit_op_strategy(bit + next_bit, bits_left, &where); cmos_write_bits(&where, nr_bits, get_bits(value, next_bit, nr_bits)); -- cgit v1.2.3