diff options
author | markj <markj@FreeBSD.org> | 2014-09-17 00:54:00 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2014-09-17 00:54:00 +0000 |
commit | 1642671ec5727db3d568e4db1c8e6b9fd2063208 (patch) | |
tree | f5a981a95d55264ecc61b6fb7ddb4bfd57473ae6 /cddl/contrib/opensolaris/lib/libdtrace | |
parent | 65bccd5b546490ed3e9ef43ce93d5a573d366801 (diff) | |
download | FreeBSD-src-1642671ec5727db3d568e4db1c8e6b9fd2063208.zip FreeBSD-src-1642671ec5727db3d568e4db1c8e6b9fd2063208.tar.gz |
Fix some incorrect endianness checks.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c index fb8ea16..4be0f03 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c @@ -167,7 +167,7 @@ print_bitfield(dt_printarg_t *pap, ulong_t off, ctf_encoding_t *ep) * to the lowest 'size' bytes in 'value', and we need to shift based on * the offset from the end of the data, not the offset of the start. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN buf += sizeof (value) - size; off += ep->cte_bits; #endif @@ -178,7 +178,7 @@ print_bitfield(dt_printarg_t *pap, ulong_t off, ctf_encoding_t *ep) * Offsets are counted from opposite ends on little- and * big-endian machines. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN shift = NBBY - shift; #endif |