diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-04-26 19:43:24 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-04-26 19:43:24 +0000 |
commit | 708629cd0c05ab438fc3b9af3268459de7d4a8e6 (patch) | |
tree | 6753627ac773481813b9c7c07a70142bd54137fb /sys/arch | |
parent | 3a9fd31666735fef020ad537ee5d25ff9651c9e4 (diff) |
Make this compile with gcc4.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/hppa/in_cksum.c | 4 |
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") |