* [PATCH] Don't use comparison_fn_t
@ 2017-04-20 13:40 Ulf Hermann
2017-04-26 14:33 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Ulf Hermann @ 2017-04-20 13:40 UTC (permalink / raw)
To: elfutils-devel
Not all search.h declare it, and it is not very helpful anyway.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
libcpu/ChangeLog | 4 ++++
libcpu/i386_parse.y | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
index 79110c2..ec22dd2 100644
--- a/libcpu/ChangeLog
+++ b/libcpu/ChangeLog
@@ -1,3 +1,7 @@
+2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
+
+ * i386_parse.y: Eliminate comparison_fn_t.
+
2016-11-02 Mark Wielaard <mjw@redhat.com>
* i386_disasm.c (i386_disasm): Add fallthrough comment.
diff --git a/libcpu/i386_parse.y b/libcpu/i386_parse.y
index 15a72b1..5fc0682 100644
--- a/libcpu/i386_parse.y
+++ b/libcpu/i386_parse.y
@@ -309,10 +309,10 @@ instr: bytes ':' bitfieldopt kID bitfieldopt optargs
newp->mnemonic = $4;
if (newp->mnemonic != (void *) -1l
&& tfind ($4, &mnemonics,
- (comparison_fn_t) strcmp) == NULL)
+ (int (*)(const void *, const void *)) strcmp) == NULL)
{
if (tsearch ($4, &mnemonics,
- (comparison_fn_t) strcmp) == NULL)
+ (int (*)(const void *, const void *)) strcmp) == NULL)
error (EXIT_FAILURE, errno, "tsearch");
++nmnemonics;
}
--
2.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Don't use comparison_fn_t
2017-04-20 13:40 [PATCH] Don't use comparison_fn_t Ulf Hermann
@ 2017-04-26 14:33 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2017-04-26 14:33 UTC (permalink / raw)
To: Ulf Hermann; +Cc: elfutils-devel
On Thu, Apr 20, 2017 at 03:40:46PM +0200, Ulf Hermann wrote:
> Not all search.h declare it, and it is not very helpful anyway.
Well, it is less typing and it kept the lines under 80 chars.
But because there were other longer lines already I just kept it.
Pushed to master.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-25 22:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 13:40 [PATCH] Don't use comparison_fn_t Ulf Hermann
2017-04-26 14:33 ` 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).