2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Improve isc_refcount with initializer and implicit destroy

Add ISC_REFCOUNT_INITIALIZER(x) macro and implicitly call
isc_refcount_destroy() in the ISC_REFCOUNT_IMPL() macros
to reduce code duplicities.
This commit is contained in:
Ondřej Surý
2023-09-22 13:57:26 +02:00
parent 6adc0be124
commit 3340c82b99
17 changed files with 5 additions and 36 deletions

View File

@@ -880,8 +880,6 @@ isc_nmhandle_is_stream(isc_nmhandle_t *handle) {
static void
nmhandle_free(isc_nmsocket_t *sock, isc_nmhandle_t *handle) {
isc_refcount_destroy(&handle->references);
handle->magic = 0;
if (handle->dofree != NULL) {