mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Unify how we handle database version in the cache
Database versions are not used in cache databases. Some places in qpcache.c required the version argument to be NULL; others marked it as UNUSED. Unify all cases to require version to be NULL.
This commit is contained in:
@@ -383,8 +383,7 @@ qp_makekey(dns_qpkey_t key, void *uctx ISC_ATTR_UNUSED, void *pval,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qp_triename(void *uctx, char *buf, size_t size) {
|
qp_triename(void *uctx ISC_ATTR_UNUSED, char *buf, size_t size) {
|
||||||
UNUSED(uctx);
|
|
||||||
snprintf(buf, size, "qpdb-lite");
|
snprintf(buf, size, "qpdb-lite");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1631,8 +1630,6 @@ qpcache_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
|
|||||||
.now = __now ? __now : isc_stdtime_now(),
|
.now = __now ? __now : isc_stdtime_now(),
|
||||||
};
|
};
|
||||||
|
|
||||||
UNUSED(version);
|
|
||||||
|
|
||||||
REQUIRE(VALID_QPDB((qpcache_t *)db));
|
REQUIRE(VALID_QPDB((qpcache_t *)db));
|
||||||
REQUIRE(version == NULL);
|
REQUIRE(version == NULL);
|
||||||
|
|
||||||
@@ -2149,10 +2146,9 @@ qpcache_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||||||
};
|
};
|
||||||
|
|
||||||
REQUIRE(VALID_QPDB(qpdb));
|
REQUIRE(VALID_QPDB(qpdb));
|
||||||
|
REQUIRE(version == NULL);
|
||||||
REQUIRE(type != dns_rdatatype_any);
|
REQUIRE(type != dns_rdatatype_any);
|
||||||
|
|
||||||
UNUSED(version);
|
|
||||||
|
|
||||||
result = ISC_R_SUCCESS;
|
result = ISC_R_SUCCESS;
|
||||||
|
|
||||||
nlock = &qpdb->buckets[qpnode->locknum].lock;
|
nlock = &qpdb->buckets[qpnode->locknum].lock;
|
||||||
@@ -2677,8 +2673,7 @@ qpcache_allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||||||
qpc_rditer_t *iterator = NULL;
|
qpc_rditer_t *iterator = NULL;
|
||||||
|
|
||||||
REQUIRE(VALID_QPDB(qpdb));
|
REQUIRE(VALID_QPDB(qpdb));
|
||||||
|
REQUIRE(version == NULL);
|
||||||
UNUSED(version);
|
|
||||||
|
|
||||||
iterator = isc_mem_get(qpdb->common.mctx, sizeof(*iterator));
|
iterator = isc_mem_get(qpdb->common.mctx, sizeof(*iterator));
|
||||||
*iterator = (qpc_rditer_t){
|
*iterator = (qpc_rditer_t){
|
||||||
|
Reference in New Issue
Block a user