summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-03-31 16:42:57 +0000
committerStefan Reinauer <stepan@openbios.org>2009-03-31 16:42:57 +0000
commit45dffef232d98ee98f1aeeeb1010e269fadff727 (patch)
tree78dc59fe5b012b5e6c4322221701387a4b0afd12
parentd469cdab93ae1d60421116def8a9800da8374274 (diff)
fix shadow variable in compute_ip_checksum.c
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4036 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--src/lib/compute_ip_checksum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/compute_ip_checksum.c b/src/lib/compute_ip_checksum.c
index 0b8eb90f85..9306baf5d0 100644
--- a/src/lib/compute_ip_checksum.c
+++ b/src/lib/compute_ip_checksum.c
@@ -16,13 +16,13 @@ unsigned long compute_ip_checksum(void *addr, unsigned long length)
sum = 0;
ptr = addr;
for(i = 0; i < length; i++) {
- unsigned long value;
- value = ptr[i];
+ unsigned long v;
+ v = ptr[i];
if (i & 1) {
- value <<= 8;
+ v <<= 8;
}
/* Add the new value */
- sum += value;
+ sum += v;
/* Wrap around the carry */
if (sum > 0xFFFF) {
sum = (sum + (sum >> 16)) & 0xFFFF;