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
@@ -3203,9 +3203,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
find->partial_result |= (adbname->partial_result & wanted_addresses);
|
||||
if (alias) {
|
||||
if (target != NULL) {
|
||||
result = dns_name_copy(&adbname->target, target, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto out;
|
||||
RUNTIME_CHECK(dns_name_copy(&adbname->target, target, NULL) == ISC_R_SUCCESS);
|
||||
}
|
||||
result = DNS_R_ALIAS;
|
||||
} else
|
||||
|
Reference in New Issue
Block a user