summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/checksum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/checksum.c b/lib/checksum.c
index b2e2fd46846..886b48db4f2 100644
--- a/lib/checksum.c
+++ b/lib/checksum.c
@@ -37,7 +37,7 @@
#include <asm/byteorder.h>
-static inline unsigned short from32to16(unsigned long x)
+static inline unsigned short from32to16(unsigned int x)
{
/* add up 16-bit and 16-bit for 16+c bit */
x = (x & 0xffff) + (x >> 16);
@@ -49,7 +49,7 @@ static inline unsigned short from32to16(unsigned long x)
static unsigned int do_csum(const unsigned char *buff, int len)
{
int odd, count;
- unsigned long result = 0;
+ unsigned int result = 0;
if (len <= 0)
goto out;
@@ -73,9 +73,9 @@ static unsigned int do_csum(const unsigned char *buff, int len)
}
count >>= 1; /* nr of 32-bit words.. */
if (count) {
- unsigned long carry = 0;
+ unsigned int carry = 0;
do {
- unsigned long w = *(unsigned int *) buff;
+ unsigned int w = *(unsigned int *) buff;
count--;
buff += 4;
result += carry;