about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-09-17 12:24:08 -0700
committerLeah Neukirchen <leah@vuxu.org>2020-09-25 14:53:47 +0200
commit02e4cf40018714501c99cbe1a0ce5280be53500a (patch)
tree7abe23675a96f80abca9fc744a9513f786d18392
parent50dfdf56055613738a32356836809a3ddfc2bc6a (diff)
downloadmblaze-02e4cf40018714501c99cbe1a0ce5280be53500a.tar.gz
mblaze-02e4cf40018714501c99cbe1a0ce5280be53500a.tar.xz
mblaze-02e4cf40018714501c99cbe1a0ce5280be53500a.zip
mpick: use function pointer type for callback
Though POSIX requires this conversion to work correctly (for dlsym),
it is not valid in ISO C, so it is better to just uses the appropriate
function pointer type.

Closes: #185 [via git-merge-pr]
-rw-r--r--mpick.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpick.c b/mpick.c
index 379200d..3b11e67 100644
--- a/mpick.c
+++ b/mpick.c
@@ -1466,7 +1466,7 @@ main(int argc, char *argv[])
 
 	xpledge("stdio rpath wpath cpath proc exec", 0);
 
-	void *cb = need_thr ? collect : oneline;
+	void (*cb)(char *) = need_thr ? collect : oneline;
 	if (argc == optind && isatty(0))
 		i = blaze822_loop1(":", cb);
 	else