From: Ondřej Surý Date: Wed, 5 Aug 2026 14:26:13 +0000 (+0200) Subject: Remove node output from the database vtable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dbd7edc24ebf68aceb6d373315c12e9c170aad3;p=thirdparty%2Fbind9.git Remove node output from the database vtable Now that nodep is unused by all database implementations, remove it from the signature of dns_dbmethods_t.find. --- diff --git a/bin/named/builtin.c b/bin/named/builtin.c index 49defd05ad6..3f4c35e83aa 100644 --- a/bin/named/builtin.c +++ b/bin/named/builtin.c @@ -857,7 +857,7 @@ findnode(dns_db_t *db, const dns_name_t *name, bool create, static isc_result_t builtin_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, isc_stdtime_t now, - dns_dbnode_t **nodep ISC_ATTR_UNUSED, dns_name_t *foundname, + dns_name_t *foundname, dns_clientinfomethods_t *methods ISC_ATTR_UNUSED, dns_clientinfo_t *clientinfo ISC_ATTR_UNUSED, dns_rdataset_t *rdataset, diff --git a/bin/tests/system/dyndb/driver/db.c b/bin/tests/system/dyndb/driver/db.c index 562fe36df2d..a6c02695997 100644 --- a/bin/tests/system/dyndb/driver/db.c +++ b/bin/tests/system/dyndb/driver/db.c @@ -319,21 +319,16 @@ findnode(dns_db_t *db, const dns_name_t *name, bool create, static isc_result_t find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, isc_stdtime_t now, - dns_dbnode_t **nodep, dns_name_t *foundname, - dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo, - dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset DNS__DB_FLARG) { + dns_name_t *foundname, dns_clientinfomethods_t *methods, + dns_clientinfo_t *clientinfo, dns_rdataset_t *rdataset, + dns_rdataset_t *sigrdataset DNS__DB_FLARG) { sampledb_t *sampledb = (sampledb_t *)db; REQUIRE(VALID_SAMPLEDB(sampledb)); - if (sampledb->db->methods->find == NULL) { - return ISC_R_NOTIMPLEMENTED; - } - - return (sampledb->db->methods->find)(sampledb->db, name, version, type, - options, now, nodep, foundname, - methods, clientinfo, rdataset, - sigrdataset DNS__DB_FLARG_PASS); + return dns__db_find(sampledb->db, name, version, type, options, now, + foundname, methods, clientinfo, rdataset, + sigrdataset DNS__DB_FLARG_PASS); } static isc_result_t diff --git a/lib/dns/db.c b/lib/dns/db.c index 4fc87e25250..4ef78f33500 100644 --- a/lib/dns/db.c +++ b/lib/dns/db.c @@ -517,8 +517,8 @@ dns__db_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, if (db->methods->find != NULL) { return (db->methods->find)(db, name, version, type, options, - now, NULL, foundname, methods, - clientinfo, rdataset, + now, foundname, methods, clientinfo, + rdataset, sigrdataset DNS__DB_FLARG_PASS); } return ISC_R_NOTIMPLEMENTED; diff --git a/lib/dns/include/dns/db.h b/lib/dns/include/dns/db.h index 4569f210c9e..43d16003bec 100644 --- a/lib/dns/include/dns/db.h +++ b/lib/dns/include/dns/db.h @@ -152,7 +152,7 @@ typedef struct dns_db_methods { isc_result_t (*find)(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, isc_stdtime_t now, - dns_dbnode_t **nodep, dns_name_t *foundname, + dns_name_t *foundname, dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo, dns_rdataset_t *rdataset, diff --git a/lib/dns/qpcache.c b/lib/dns/qpcache.c index 783d4fc605f..a0e033d9a28 100644 --- a/lib/dns/qpcache.c +++ b/lib/dns/qpcache.c @@ -1392,7 +1392,7 @@ qpc_search_deinit(qpc_search_t *search DNS__DB_FLARG) { static isc_result_t qpcache_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, isc_stdtime_t __now, - dns_dbnode_t **nodep ISC_ATTR_UNUSED, dns_name_t *foundname, + dns_name_t *foundname, dns_clientinfomethods_t *methods ISC_ATTR_UNUSED, dns_clientinfo_t *clientinfo ISC_ATTR_UNUSED, dns_rdataset_t *rdataset, diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index 547db093bae..43de5890018 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -3442,8 +3442,7 @@ qpz_search_init(qpz_search_t *search, qpzonedb_t *db, qpz_version_t *version, static isc_result_t qpzone_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, - isc_stdtime_t now ISC_ATTR_UNUSED, - dns_dbnode_t **nodep ISC_ATTR_UNUSED, dns_name_t *foundname, + isc_stdtime_t now ISC_ATTR_UNUSED, dns_name_t *foundname, dns_clientinfomethods_t *methods ISC_ATTR_UNUSED, dns_clientinfo_t *clientinfo ISC_ATTR_UNUSED, dns_rdataset_t *rdataset, @@ -5209,7 +5208,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype, dns_rdataset_init(&sigrdataset_aaaa); result = qpzone_find(ctx->db, name, ctx->version, dns_rdatatype_a, - DNS_DBFIND_GLUEOK, 0, NULL, name_a, NULL, NULL, + DNS_DBFIND_GLUEOK, 0, name_a, NULL, NULL, &rdataset_a, &sigrdataset_a DNS__DB_FLARG_PASS); if (result == DNS_R_GLUE) { glue = new_glue(ctx->db->mctx, name_a); @@ -5226,7 +5225,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype, } result = qpzone_find(ctx->db, name, ctx->version, dns_rdatatype_aaaa, - DNS_DBFIND_GLUEOK, 0, NULL, name_aaaa, NULL, NULL, + DNS_DBFIND_GLUEOK, 0, name_aaaa, NULL, NULL, &rdataset_aaaa, &sigrdataset_aaaa DNS__DB_FLARG_PASS); if (result == DNS_R_GLUE) { diff --git a/lib/dns/sdlz.c b/lib/dns/sdlz.c index cdd2f438c5a..d66792aca30 100644 --- a/lib/dns/sdlz.c +++ b/lib/dns/sdlz.c @@ -765,9 +765,8 @@ findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, static isc_result_t sdlz_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, isc_stdtime_t now, - dns_dbnode_t **nodep ISC_ATTR_UNUSED, dns_name_t *foundname, - dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo, - dns_rdataset_t *rdataset, + dns_name_t *foundname, dns_clientinfomethods_t *methods, + dns_clientinfo_t *clientinfo, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset DNS__DB_FLARG) { dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db; dns_dbnode_t *node = NULL;