]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
libfast: Fix incompatible function types warning
authorTobias Brunner <tobias@strongswan.org>
Fri, 15 Jul 2022 12:48:02 +0000 (14:48 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 18 Jul 2022 10:42:24 +0000 (12:42 +0200)
src/libfast/fast_dispatcher.c

index 68a40612229f22de50cd2fff81ab2b279265cb10..f7b674ea63fa674a43120fe8e460029154e52229 100644 (file)
@@ -295,7 +295,8 @@ static void cleanup_sessions(private_fast_dispatcher_t *this, time_t now)
 /**
  * Actual dispatching code
  */
-static void dispatch(private_fast_dispatcher_t *this)
+CALLBACK(dispatch, void*,
+       private_fast_dispatcher_t *this)
 {
        thread_cancelability(FALSE);
 
@@ -363,6 +364,7 @@ static void dispatch(private_fast_dispatcher_t *this)
 
                request->destroy(request);
        }
+       return NULL;
 }
 
 METHOD(fast_dispatcher_t, run, void,
@@ -372,8 +374,7 @@ METHOD(fast_dispatcher_t, run, void,
        this->threads = malloc(sizeof(thread_t*) * threads);
        while (threads)
        {
-               this->threads[threads - 1] = thread_create((thread_main_t)dispatch,
-                                                                                                  this);
+               this->threads[threads - 1] = thread_create(dispatch, this);
                if (this->threads[threads - 1])
                {
                        threads--;