Author: stepan Date: 2009-03-31 18:42:57 +0200 (Tue, 31 Mar 2009) New Revision: 4036
Modified: trunk/coreboot-v2/src/lib/compute_ip_checksum.c Log: fix shadow variable in compute_ip_checksum.c
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/coreboot-v2/src/lib/compute_ip_checksum.c =================================================================== --- trunk/coreboot-v2/src/lib/compute_ip_checksum.c 2009-03-31 16:32:01 UTC (rev 4035) +++ trunk/coreboot-v2/src/lib/compute_ip_checksum.c 2009-03-31 16:42:57 UTC (rev 4036) @@ -16,13 +16,13 @@ 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;