summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/hppa/in_cksum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/hppa/hppa/in_cksum.c b/sys/arch/hppa/hppa/in_cksum.c
index c647842ed54..fdab18ef673 100644
--- a/sys/arch/hppa/hppa/in_cksum.c
+++ b/sys/arch/hppa/hppa/in_cksum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_cksum.c,v 1.3 2004/04/07 18:24:19 mickey Exp $ */
+/* $OpenBSD: in_cksum.c,v 1.4 2010/04/26 19:43:23 kettenis Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -64,7 +64,7 @@
#define REDUCE {sum = (sum & 0xffff) + (sum >> 16); ADDCARRY}
#define ROL asm volatile ("shd %0, %0, 8, %0" : "+r" (sum))
#define ADDBYTE {ROL; sum += *w++; bins++; mlen--;}
-#define ADDSHORT {sum += *((u_short *)w)++; mlen -= 2;}
+#define ADDSHORT {sum += *(u_short *)w; w += 2; mlen -= 2;}
#define ADDWORD asm volatile( "ldwm 4(%1), %%r19! add %0, %%r19, %0\n\t" \
"ldo -4(%2), %2 ! addc %0, 0, %0" \
: "+r" (sum), "+r" (w), "+r" (mlen) :: "r19")