X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=lib%2Fchecksum.c;h=097508732f34fdbb9de955509685f43df2feba32;hb=90b9a32d8f441369b2f97a765d2d957b531eb653;hp=886b48db4f28861cbaf65065d641b00fbb2ee99a;hpb=c44ba9f6684946b156335da6a6d55f0b8cf7cb72;p=safe%2Fjmp%2Flinux-2.6 diff --git a/lib/checksum.c b/lib/checksum.c index 886b48d..0975087 100644 --- a/lib/checksum.c +++ b/lib/checksum.c @@ -37,6 +37,7 @@ #include +#ifndef do_csum static inline unsigned short from32to16(unsigned int x) { /* add up 16-bit and 16-bit for 16+c bit */ @@ -56,9 +57,9 @@ static unsigned int do_csum(const unsigned char *buff, int len) odd = 1 & (unsigned long) buff; if (odd) { #ifdef __LITTLE_ENDIAN - result = *buff; -#else result += (*buff << 8); +#else + result = *buff; #endif len--; buff++; @@ -102,6 +103,7 @@ static unsigned int do_csum(const unsigned char *buff, int len) out: return result; } +#endif /* * This is a version of ip_compute_csum() optimized for IP headers,