diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-08-26 03:36:03 +0400 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-08-26 03:36:03 +0400 |
commit | 7bc5ee0785a528962bffc586f7d447d79e2642b4 (patch) | |
tree | a17cf90defc935ac8d773f06383950c1ff96ea52 /net/net.c | |
parent | 61dada83f34f83f32163febfd9bfd93bf9b0c732 (diff) | |
download | u-boot-7bc5ee0785a528962bffc586f7d447d79e2642b4.tar.xz |
Prepare U-Boot for gcc-4.x
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1574,10 +1574,11 @@ unsigned NetCksum(uchar * ptr, int len) { ulong xsum; + ushort *p = ptr; xsum = 0; while (len-- > 0) - xsum += *((ushort *)ptr)++; + xsum += *p++; xsum = (xsum & 0xffff) + (xsum >> 16); xsum = (xsum & 0xffff) + (xsum >> 16); return (xsum & 0xffff); |