aboutsummaryrefslogtreecommitdiff
path: root/elf/check-textrel.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/check-textrel.c')
-rw-r--r--elf/check-textrel.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/elf/check-textrel.c b/elf/check-textrel.c
index 69210b2be8..ec97e4b0c9 100644
--- a/elf/check-textrel.c
+++ b/elf/check-textrel.c
@@ -1,5 +1,5 @@
/* Check for text relocations in DSOs.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contribute by Ulrich Drepper <drepper@redhat.com>. 2002.
@@ -38,8 +38,10 @@
# define __E(name, bits) Elf##bits##_##name
# define SWAP(val) \
({ __typeof (val) __res; \
- if ((ehdr.e_ident[EI_DATA] == ELFDATA2MSB && BYTE_ORDER == LITTLE_ENDIAN \
- || ehdr.e_ident[EI_DATA] == ELFDATA2LSB && BYTE_ORDER == BIG_ENDIAN)\
+ if (((ehdr.e_ident[EI_DATA] == ELFDATA2MSB \
+ && BYTE_ORDER == LITTLE_ENDIAN) \
+ || (ehdr.e_ident[EI_DATA] == ELFDATA2LSB \
+ && BYTE_ORDER == BIG_ENDIAN)) \
&& sizeof (val) != 1) \
{ \
if (sizeof (val) == 2) \