]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix callback to match prototype
authorMark Andrews <marka@isc.org>
Tue, 17 Oct 2023 06:28:59 +0000 (17:28 +1100)
committerMark Andrews <marka@isc.org>
Tue, 17 Oct 2023 06:47:24 +0000 (17:47 +1100)
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

index 1bf959ac19c39f054ae21c0dc6ce8129d089129a..f75207a223b1dea6b94ad1f612270612dfd67203 100644 (file)
@@ -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