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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user