mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Add RUNTIME_CHECK() around result = dns_name_copy(..., NULL) calls
This second commit uses second semantic patch to replace the calls to dns_name_copy() with NULL as third argument where the result was stored in a isc_result_t variable. As the dns_name_copy(..., NULL) cannot fail gracefully when the third argument is NULL, it was just a bunch of dead code. Couple of manual tweaks (removing dead labels and unused variables) were manually applied on top of the semantic patch.
This commit is contained in:
committed by
Mark Andrews
parent
35bd7e4da0
commit
89b269b0d2
@@ -997,18 +997,7 @@ findext(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
|
||||
if (foundname != NULL) {
|
||||
isc_result_t xresult;
|
||||
|
||||
xresult = dns_name_copy(xname, foundname, NULL);
|
||||
if (xresult != ISC_R_SUCCESS) {
|
||||
if (node != NULL) {
|
||||
detachnode(db, &node);
|
||||
}
|
||||
if (dns_rdataset_isassociated(rdataset)) {
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
}
|
||||
return (DNS_R_BADDB);
|
||||
}
|
||||
RUNTIME_CHECK(dns_name_copy(xname, foundname, NULL) == ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (nodep != NULL)
|
||||
|
Reference in New Issue
Block a user