charon-nm: Use CALLBACK macro for callback job's cancel implementation

Casting to this specific function type doesn't work anymore if C23 is
used as the types mismatch.
This commit is contained in:
Tobias Brunner 2025-02-21 16:47:34 +01:00
parent a7b5de5690
commit 38d89f57f0

View File

@ -78,7 +78,8 @@ static job_requeue_t run(nm_backend_t *this)
/**
* Cancel the GLib Main Event Loop
*/
static bool cancel(nm_backend_t *this)
CALLBACK(cancel, bool,
nm_backend_t *this)
{
if (this->loop)
{
@ -152,7 +153,7 @@ static bool nm_backend_init()
lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create_with_prio((callback_job_cb_t)run, this,
NULL, (callback_job_cancel_t)cancel, JOB_PRIO_CRITICAL));
NULL, cancel, JOB_PRIO_CRITICAL));
return TRUE;
}