summaryrefslogtreecommitdiffstats
path: root/libasm/asm_end.c
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-04-27 16:35:23 +0200
committerMark Wielaard <[email protected]>2017-04-28 00:33:18 +0200
commitab293bfbc76a0fa5461bcbdb105332a9f1d85892 (patch)
tree0c4d46f6de1838b4b73584787d26ebb6b9c7b7b0 /libasm/asm_end.c
parenta6c6fb4ae497a086e75f9436b67a1de4564bfb91 (diff)
Fix nesting of braces
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 <[email protected]>
Diffstat (limited to 'libasm/asm_end.c')
-rw-r--r--libasm/asm_end.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libasm/asm_end.c b/libasm/asm_end.c
index 191a535a..ced24f50 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;