From: Ulf Hermann Date: Thu, 27 Apr 2017 14:35:23 +0000 (+0200) Subject: Fix nesting of braces X-Git-Tag: elfutils-0.169~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab293bfbc76a0fa5461bcbdb105332a9f1d85892;p=thirdparty%2Felfutils.git Fix nesting of braces The way it was before it didn't actually test if elf_update failed, but rather did something random. !!() is a boolean and boolean true can be represented as anything non-0, including negative numbers. Signed-off-by: Ulf Hermann --- diff --git a/libasm/ChangeLog b/libasm/ChangeLog index 165684221..d2bc40860 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,7 @@ +2017-04-27 Ulf Hermann + + * asm_end.c (binary_end): Fix nesting of braces. + 2017-02-12 Mark Wielaard * asm_newsym.c (asm_newsym): Increase TEMPSYMLEN to 13. diff --git a/libasm/asm_end.c b/libasm/asm_end.c index 191a535a0..ced24f50b 100644 --- a/libasm/asm_end.c +++ b/libasm/asm_end.c @@ -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;