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

require non-NULL methods on accessors

This commit is contained in:
Bob Halley
1999-04-01 04:01:30 +00:00
parent 5bfea18ff8
commit 0180ccf72c

View File

@@ -80,6 +80,7 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset) {
*/ */
REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(DNS_RDATASET_VALID(rdataset));
REQUIRE(rdataset->methods != NULL);
(rdataset->methods->disassociate)(rdataset); (rdataset->methods->disassociate)(rdataset);
rdataset->methods = NULL; rdataset->methods = NULL;
@@ -102,6 +103,7 @@ dns_rdataset_first(dns_rdataset_t *rdataset) {
*/ */
REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(DNS_RDATASET_VALID(rdataset));
REQUIRE(rdataset->methods != NULL);
return ((rdataset->methods->first)(rdataset)); return ((rdataset->methods->first)(rdataset));
} }
@@ -114,6 +116,7 @@ dns_rdataset_next(dns_rdataset_t *rdataset) {
*/ */
REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(DNS_RDATASET_VALID(rdataset));
REQUIRE(rdataset->methods != NULL);
return ((rdataset->methods->next)(rdataset)); return ((rdataset->methods->next)(rdataset));
} }
@@ -126,6 +129,7 @@ dns_rdataset_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
*/ */
REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(DNS_RDATASET_VALID(rdataset));
REQUIRE(rdataset->methods != NULL);
(rdataset->methods->current)(rdataset, rdata); (rdataset->methods->current)(rdataset, rdata);
} }