2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

move declaration to the top of the block

This commit is contained in:
Evan Hunt
2018-10-05 11:13:54 -07:00
parent 9bf25f7f1e
commit c642f9970a

View File

@@ -2048,8 +2048,11 @@ cidr_free(dns_rpz_zones_t *rpzs) {
*/ */
static void static void
rpz_detach(dns_rpz_zone_t **rpzp, dns_rpz_zones_t *rpzs) { rpz_detach(dns_rpz_zone_t **rpzp, dns_rpz_zones_t *rpzs) {
dns_rpz_zone_t *rpz;
REQUIRE(rpzp != NULL && *rpzp != NULL); REQUIRE(rpzp != NULL && *rpzp != NULL);
dns_rpz_zone_t *rpz = *rpzp;
rpz = *rpzp;
*rpzp = NULL; *rpzp = NULL;
if (isc_refcount_decrement(&rpz->refs) != 1) { if (isc_refcount_decrement(&rpz->refs) != 1) {
@@ -2092,7 +2095,7 @@ rpz_detach(dns_rpz_zone_t **rpzp, dns_rpz_zones_t *rpzs) {
if (rpz->dbversion != NULL) { if (rpz->dbversion != NULL) {
dns_db_closeversion(rpz->db, &rpz->dbversion, false); dns_db_closeversion(rpz->db, &rpz->dbversion, false);
} }
if (rpz->db) { if (rpz->db != NULL) {
dns_db_detach(&rpz->db); dns_db_detach(&rpz->db);
} }
if (rpz->updaterunning) { if (rpz->updaterunning) {