]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix nesting of braces
authorUlf Hermann <ulf.hermann@qt.io>
Thu, 27 Apr 2017 14:35:23 +0000 (16:35 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 27 Apr 2017 22:33:18 +0000 (00:33 +0200)
The way it was before it didn't actually test if elf_update failed, but
rather did something random. !!(<some number>) is a boolean and boolean
true can be represented as anything non-0, including negative numbers.

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
libasm/ChangeLog
libasm/asm_end.c

index 16568422108e0f3e5f2ab3aea6e76e6499b53e4a..d2bc40860e7174f8c7eeeb815d0b9cf613eb5e62 100644 (file)
@@ -1,3 +1,7 @@
+2017-04-27  Ulf Hermann  <ulf.hermann@qt.io>
+
+       * asm_end.c (binary_end): Fix nesting of braces.
+
 2017-02-12  Mark Wielaard  <mjw@redhat.com>
 
        * asm_newsym.c (asm_newsym): Increase TEMPSYMLEN to 13.
index 191a535a05c83709c406ae616d65607f5370845f..ced24f50b307a7adae7f8667724294091d9db3bc 100644 (file)
@@ -464,7 +464,7 @@ binary_end (AsmCtx_t *ctx)
   gelf_update_ehdr (ctx->out.elf, ehdr);
 
   /* Write out the ELF file.  */
-  if (unlikely (elf_update (ctx->out.elf, ELF_C_WRITE_MMAP)) < 0)
+  if (unlikely (elf_update (ctx->out.elf, ELF_C_WRITE_MMAP) < 0))
     {
       __libasm_seterrno (ASM_E_LIBELF);
       result = -1;