mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
use ISC_LIST_FOREACH in more places
use the ISC_LIST_FOREACH pattern in places where lists had been iterated using a different pattern from the typical `for` loop: for example, `while (!ISC_LIST_EMPTY(...))` or `while ((e = ISC_LIST_HEAD(...)) != NULL)`.
This commit is contained in:
@@ -771,11 +771,7 @@ client_resfind(resctx_t *rctx, dns_fetchresponse_t *resp) {
|
||||
* Free temporary resources
|
||||
*/
|
||||
if (ansname != NULL) {
|
||||
dns_rdataset_t *rdataset;
|
||||
|
||||
while ((rdataset = ISC_LIST_HEAD(ansname->list)) !=
|
||||
NULL)
|
||||
{
|
||||
ISC_LIST_FOREACH_SAFE (ansname->list, rdataset, link) {
|
||||
ISC_LIST_UNLINK(ansname->list, rdataset, link);
|
||||
putrdataset(mctx, &rdataset);
|
||||
}
|
||||
|
Reference in New Issue
Block a user