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)
downloadu-boot-imx-7bc5ee0785a528962bffc586f7d447d79e2642b4.zip
u-boot-imx-7bc5ee0785a528962bffc586f7d447d79e2642b4.tar.gz
u-boot-imx-7bc5ee0785a528962bffc586f7d447d79e2642b4.tar.bz2
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 00217be..d13ae74 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);