From 47a9a00a11b9493b89ae3f434b3056b17efb4e14 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Sat, 4 Aug 2012 15:15:59 +0000 Subject: [PATCH] it makes no sense to return a value from an effectively detached thread --- daemon/aux.c | 6 +++--- daemon/aux.h | 2 +- daemon/main.c | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/daemon/aux.c b/daemon/aux.c index b145c9dc3..c3e57e5b6 100644 --- a/daemon/aux.c +++ b/daemon/aux.c @@ -18,8 +18,8 @@ struct detach_thread { - GThreadFunc func; - gpointer data; + void (*func)(void *); + void *data; }; @@ -145,7 +145,7 @@ static gpointer thread_detach_func(gpointer d) { return NULL; } -void thread_create_detach(GThreadFunc f, gpointer d) { +void thread_create_detach(void (*f)(void *), void *d) { struct detach_thread *dt; dt = g_slice_alloc(sizeof(*dt)); diff --git a/daemon/aux.h b/daemon/aux.h index 08a94794e..745dcf8c1 100644 --- a/daemon/aux.h +++ b/daemon/aux.h @@ -198,7 +198,7 @@ typedef GCond cond_t; void thread_join_me(); void threads_join_all(); -void thread_create_detach(GThreadFunc, gpointer); +void thread_create_detach(void (*)(void *), void *); diff --git a/daemon/main.c b/daemon/main.c index 05e7c3104..5f21e6b74 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -59,7 +59,7 @@ static char *b2b_url; -gpointer sighandler(gpointer x) { +static void sighandler(gpointer x) { sigset_t ss; int ret; struct timespec ts; @@ -87,8 +87,6 @@ gpointer sighandler(gpointer x) { else abort(); } - - return NULL; }