From: Matthijs Mekking Date: Mon, 3 Nov 2025 11:45:39 +0000 (+0100) Subject: Remove unused dns_zone_getnotifyacl() function X-Git-Tag: v9.21.15~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9ecc0bd2694622945e327ad38cca52f82ee9522;p=thirdparty%2Fbind9.git Remove unused dns_zone_getnotifyacl() function CID 638286: Concurrent data access violations (MISSING_LOCK). This complains about accessing "zone->notifyctx.notify_acl" without holding the lock "dns_zone.lock". Elsewhere, reading this data does have the lock, so it makes sense that in the getter function this must also be so. However, the function is unused so we can just remove it. CID 638287: Concurrent data access violations (MISSING_LOCK). This complains about accessing "zone->locked" without holding the lock "dns_zone.lock". I think this is a false positive as "dns__zone_lock()" and "dns__zone_unlock() are wrappers around "LOCK_ZONE()" and "UNLOCK_ZONE()" and where these macros were used they were only replaced with the internal zone functions. Moreover, "zone->locked" is only accessed in these macros (and "TRYLOCK_ZONE()" and "LOCKED_ZONE()"). --- diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h index acde98421b1..b45c842c9a6 100644 --- a/lib/dns/include/dns/zone.h +++ b/lib/dns/include/dns/zone.h @@ -976,19 +976,6 @@ dns_zone_setxfracl(dns_zone_t *zone, dns_acl_t *acl); *\li 'acl' to be valid acl. */ -dns_acl_t * -dns_zone_getnotifyacl(dns_zone_t *zone); -/*%< - * Returns the current notify acl or NULL. - * - * Require: - *\li 'zone' to be a valid zone. - * - * Returns: - *\li acl a pointer to the acl. - *\li NULL - */ - dns_acl_t * dns_zone_getqueryacl(dns_zone_t *zone); /*%< diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 280cf2b79f7..d0bc8b65c4b 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15399,13 +15399,6 @@ dns_zone_setxfracl(dns_zone_t *zone, dns_acl_t *acl) { UNLOCK_ZONE(zone); } -dns_acl_t * -dns_zone_getnotifyacl(dns_zone_t *zone) { - REQUIRE(DNS_ZONE_VALID(zone)); - - return zone->notifyctx.notify_acl; -} - dns_acl_t * dns_zone_getqueryacl(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone));