Use bswap32() as SCR_BO() macro to avoid unexpected side effects.
SCR_BO(*src++) caused some trouble.
This commit is contained in:
parent
4d08b56ebd
commit
7374a44f77
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: ncrreg.h,v 1.15 1999/12/05 18:25:19 thorpej Exp $ */
|
/* $NetBSD: ncrreg.h,v 1.16 1999/12/18 07:57:03 tsutsui Exp $ */
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
**
|
**
|
||||||
@ -294,8 +294,7 @@ struct ncr_reg {
|
|||||||
typedef U_INT32 ncrcmd;
|
typedef U_INT32 ncrcmd;
|
||||||
|
|
||||||
#if BYTE_ORDER == BIG_ENDIAN
|
#if BYTE_ORDER == BIG_ENDIAN
|
||||||
#define SCR_BO(x) (((x) >> 24) | (((x) >> 8) & 0xff00) | \
|
#define SCR_BO(x) bswap32(x)
|
||||||
((x) << 24) | (((x) & 0xff00) << 8))
|
|
||||||
#else
|
#else
|
||||||
#define SCR_BO(x) (x)
|
#define SCR_BO(x) (x)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user