From 62342212532b46b11a9d229d0bc6b7655158d288 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: May 25 2020 06:45:49 +0000 Subject: bind-9.16: Fix assertions on isc_refcount_init Since [0] isc_refcount_init doesn't return isc_result_t and fallbacks to C11 atomic_init. [0]: https://gitlab.isc.org/isc-projects/bind9/-/commit/0a7535ac81b2305b320794a8bad45c03c186021e --- diff --git a/src/ldap_driver.c b/src/ldap_driver.c index cab7a9b..6c2a230 100644 --- a/src/ldap_driver.c +++ b/src/ldap_driver.c @@ -1008,7 +1008,7 @@ ldapdb_create(isc_mem_t *mctx, dns_name_t *name, dns_dbtype_t type, CHECK(dns_name_dupwithoffsets(name, mctx, &ldapdb->common.origin)); - CHECK(isc_refcount_init(&ldapdb->refs, 1)); + isc_refcount_init(&ldapdb->refs, 1); ldapdb->ldap_inst = driverarg; CHECK(dns_db_create(mctx, "rbt", name, dns_dbtype_zone, diff --git a/src/ldap_helper.c b/src/ldap_helper.c index 851cbf5..8b15a84 100644 --- a/src/ldap_helper.c +++ b/src/ldap_helper.c @@ -553,7 +553,7 @@ new_ldap_instance(isc_mem_t *mctx, const char *db_name, const char *parameters, CHECKED_MEM_GET_PTR(mctx, ldap_inst); ZERO_PTR(ldap_inst); - CHECK(isc_refcount_init(&ldap_inst->errors, 0)); + isc_refcount_init(&ldap_inst->errors, 0); isc_mem_attach(mctx, &ldap_inst->mctx); CHECKED_MEM_STRDUP(mctx, db_name, ldap_inst->db_name); dns_view_attach(dctx->view, &ldap_inst->view); diff --git a/src/mldap.c b/src/mldap.c index b87fe30..fbab108 100644 --- a/src/mldap.c +++ b/src/mldap.c @@ -63,7 +63,7 @@ mldap_new(isc_mem_t *mctx, mldapdb_t **mldapp) { ZERO_PTR(mldap); isc_mem_attach(mctx, &mldap->mctx); - CHECK(isc_refcount_init(&mldap->generation, 0)); + isc_refcount_init(&mldap->generation, 0); CHECK(metadb_new(mctx, &mldap->mdb)); *mldapp = mldap; diff --git a/src/syncrepl.c b/src/syncrepl.c index 3b2539c..2352319 100644 --- a/src/syncrepl.c +++ b/src/syncrepl.c @@ -283,7 +283,7 @@ sync_ctx_init(isc_mem_t *mctx, ldap_instance_t *inst, sync_ctx_t **sctxp) { cond_ready = true; /* refcount includes ldap_inst->task implicitly */ - CHECK(isc_refcount_init(&sctx->task_cnt, 0)); + isc_refcount_init(&sctx->task_cnt, 0); refcount_ready = true; ISC_LIST_INIT(sctx->tasks);