diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-11-10 10:39:58 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-11-10 10:39:58 +0000 |
commit | 5048fda567e73c792fc1f49a68d7b4359934978e (patch) | |
tree | 280a7d1dba207e97890df00d39d2efded11c9d7b /sys/arch | |
parent | 848e428171af0dea977fcf3a925ea855127da0dc (diff) |
Be careful about local varnames in macros.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/pc532/include/endian.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/arch/pc532/include/endian.h b/sys/arch/pc532/include/endian.h index b4909155ed0..ae7ff90279e 100644 --- a/sys/arch/pc532/include/endian.h +++ b/sys/arch/pc532/include/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.5 1997/11/10 00:10:17 niklas Exp $ */ +/* $OpenBSD: endian.h,v 1.6 1997/11/10 10:39:57 niklas Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -34,18 +34,19 @@ #ifdef __GNUC__ -#define __swap32md(x) ({ \ - register u_int32_t __x = (x); \ -\ - __asm ("rotw 8,%1; rotd 16,%1; rotw 8,%1" : "=r" (__x) : "0" (__x)); \ - __x; \ +#define __swap32md(x) ({ \ + u_int32_t __swap32md_x = (x); \ + \ + __asm ("rotw 8,%1; rotd 16,%1; rotw 8,%1" : \ + "=r" (__swap32md_x) : "0" (__swap32md_x)); \ + __swap32md_x; \ }) -#define __swap16md(x) ({ \ - register u_int16_t __x = (x); \ -\ - __asm ("rotw 8,%1" : "=r" (__x) : "0" (__x)); \ - __x; \ +#define __swap16md(x) ({ \ + u_int16_t __swap16md_x = (x); \ + \ + __asm ("rotw 8,%1" : "=r" (__swap16md_x) : "0" (__swap16md_x)); \ + __swap16md_x; \ }) /* Tell sys/endian.h we have MD variants of the swap macros. */ |