From a25ab7ec25481b186985379c3983e6c4650edba6 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 17 Oct 2023 17:28:59 +1100 Subject: [PATCH] Fix callback to match prototype noop_accept_cb triggers an undefined behaviour failure with LLVM 17. The return type mismatched the prototype. Also return ISC_R_SUCCESS instead of 0. --- tests/isc/netmgr_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/isc/netmgr_test.c b/tests/isc/netmgr_test.c index 1bf959ac19..f75207a223 100644 --- a/tests/isc/netmgr_test.c +++ b/tests/isc/netmgr_test.c @@ -393,7 +393,7 @@ noop_recv_cb(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region, UNUSED(cbarg); } -static unsigned int +static isc_result_t noop_accept_cb(isc_nmhandle_t *handle, isc_result_t result, void *cbarg) { UNUSED(handle); UNUSED(cbarg); @@ -402,7 +402,7 @@ noop_accept_cb(isc_nmhandle_t *handle, isc_result_t result, void *cbarg) { (void)atomic_fetch_add(&saccepts, 1); } - return (0); + return (ISC_R_SUCCESS); } static void