mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
improve readability of radix code
- use RADIX_V4 and RADIX_V6 instead of 0 and 1 as array indices - remove some unused macros
This commit is contained in:
@@ -219,12 +219,13 @@ dns_acl_match(const isc_netaddr_t *reqaddr,
|
||||
|
||||
/* Found a match. */
|
||||
if (result == ISC_R_SUCCESS && node != NULL) {
|
||||
int off = ISC_RADIX_OFF(&pfx);
|
||||
match_num = node->node_num[off];
|
||||
if (*(isc_boolean_t *) node->data[off])
|
||||
int fam = ISC_RADIX_FAMILY(&pfx);
|
||||
match_num = node->node_num[fam];
|
||||
if (*(isc_boolean_t *) node->data[fam]) {
|
||||
*match = match_num;
|
||||
else
|
||||
} else {
|
||||
*match = -match_num;
|
||||
}
|
||||
}
|
||||
|
||||
isc_refcount_destroy(&pfx.refcount);
|
||||
|
Reference in New Issue
Block a user