summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-08-26 01:36:03 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-08-26 01:36:03 +0200
commit7bc5ee0785a528962bffc586f7d447d79e2642b4 (patch)
treea17cf90defc935ac8d773f06383950c1ff96ea52 /net/net.c
parent61dada83f34f83f32163febfd9bfd93bf9b0c732 (diff)
Prepare U-Boot for gcc-4.x
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index 00217be0810..d13ae74cd14 100644
--- a/net/net.c
+++ b/net/net.c
@@ -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);