mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-20 21:58:03 -04:00
for good style, call dns_rdataset_first() first when dealing with questions
This commit is contained in:
parent
8631cc57a9
commit
89d8adb666
1 changed files with 4 additions and 2 deletions
|
|
@ -232,9 +232,11 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
|
|||
REQUIRE(DNS_RDATASET_VALID(rdataset));
|
||||
REQUIRE(countp != NULL);
|
||||
|
||||
if ((rdataset->attributes & DNS_RDATASETATTR_QUESTION) != 0)
|
||||
if ((rdataset->attributes & DNS_RDATASETATTR_QUESTION) != 0) {
|
||||
question = ISC_TRUE;
|
||||
else {
|
||||
result = dns_rdataset_first(rdataset);
|
||||
INSIST(result == DNS_R_NOMORE);
|
||||
} else {
|
||||
result = dns_rdataset_first(rdataset);
|
||||
if (result == DNS_R_NOMORE)
|
||||
return (DNS_R_SUCCESS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue