for good style, call dns_rdataset_first() first when dealing with questions

This commit is contained in:
Bob Halley
1999-08-03 20:54:56 +00:00
parent 8631cc57a9
commit 89d8adb666

View File

@@ -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);