summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 2f3e878e7a..eb3c41577a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -744,8 +744,8 @@ _dl_map_object_from_fd (const char *name, int fd, char *realname,
   header = (void *) readbuf;
 
   /* Check the header for basic validity.  */
-  if (__builtin_expect (VALID_ELF_HEADER (header->e_ident, expected, EI_PAD),
-			0) != 0)
+  if (__builtin_expect (!VALID_ELF_HEADER (header->e_ident, expected, EI_PAD),
+			0))
     {
       /* Something is wrong.  */
       if (*(Elf32_Word *) &header->e_ident !=