* [PATCH] Fix nesting of braces
@ 2017-04-27 16:02 Ulf Hermann
2017-04-28 8:51 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Ulf Hermann @ 2017-04-27 16:02 UTC (permalink / raw)
To: elfutils-devel
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 | 4 ++++
libasm/asm_end.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/libasm/ChangeLog b/libasm/ChangeLog
index 1656842..d2bc408 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -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.
diff --git a/libasm/asm_end.c b/libasm/asm_end.c
index 191a535..ced24f5 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;
--
2.8.1.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix nesting of braces
2017-04-27 16:02 [PATCH] Fix nesting of braces Ulf Hermann
@ 2017-04-28 8:51 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2017-04-28 8:51 UTC (permalink / raw)
To: Ulf Hermann; +Cc: elfutils-devel
On Thu, Apr 27, 2017 at 04:35:23PM +0200, Ulf Hermann wrote:
> 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.
Urgh. Another good find.
Thanks. Applied to master.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-27 22:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 16:02 [PATCH] Fix nesting of braces Ulf Hermann
2017-04-28 8:51 ` Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).