*
*\li 'target' is a valid buffer.
*
- *\li 'section' is a valid section label.
+ *\li 'section' is a named section label.
*
* Ensures:
*
* Requires:
*\li 'msg' be valid.
*
- *\li 'section' be a valid section.
+ *\li 'section' be a named section.
*
*\li If a pointer to the name is desired, 'foundname' should be non-NULL.
* If it is non-NULL, '*foundname' MUST be NULL.
} else \
isc_buffer_putstr(b, s); \
}
+#define VALID_NAMED_PSEUDOSECTION(s) \
+ (((s) > DNS_PSEUDOSECTION_ANY) && ((s) < DNS_PSEUDOSECTION_MAX))
#define VALID_PSEUDOSECTION(s) \
(((s) >= DNS_PSEUDOSECTION_ANY) && ((s) < DNS_PSEUDOSECTION_MAX))
* to be filled in, that we can in fact fill it in.
*/
REQUIRE(msg != NULL);
- REQUIRE(VALID_SECTION(section));
+ REQUIRE(VALID_NAMED_SECTION(section));
REQUIRE(target != NULL);
REQUIRE(name == NULL || *name == NULL);
REQUIRE(DNS_MESSAGE_VALID(msg));
REQUIRE(target != NULL);
- REQUIRE(VALID_SECTION(section));
+ REQUIRE(VALID_NAMED_SECTION(section));
saved_count = msg->indent.count;
REQUIRE(DNS_MESSAGE_VALID(msg));
REQUIRE(target != NULL);
- REQUIRE(VALID_PSEUDOSECTION(section));
+ REQUIRE(VALID_NAMED_PSEUDOSECTION(section));
saved_count = msg->indent.count;
REQUIRE(DNS_MESSAGE_VALID(msg));
REQUIRE(target != NULL);
- REQUIRE(VALID_PSEUDOSECTION(section));
+ REQUIRE(VALID_NAMED_PSEUDOSECTION(section));
if ((dns_master_styleflags(style) & DNS_STYLEFLAG_YAML) != 0) {
return (dns_message_pseudosectiontoyaml(msg, section, style,