} else \
isc_buffer_putstr(b, s); \
}
+#define PUT_YAMLSTR(target, namebuf, len, utfok) \
+ { \
+ result = put_yamlstr(target, namebuf, len, utfok); \
+ if (result != ISC_R_SUCCESS) { \
+ goto cleanup; \
+ } \
+ }
#define VALID_NAMED_PSEUDOSECTION(s) \
(((s) > DNS_PSEUDOSECTION_ANY) && ((s) < DNS_PSEUDOSECTION_MAX))
#define VALID_PSEUDOSECTION(s) \
dns_name_format(name, namebuf, sizeof(namebuf));
ADD_STRING(target, " \"");
if (yaml) {
- result = put_yamlstr(target, (unsigned char *)namebuf,
- strlen(namebuf), false);
- if (result != ISC_R_SUCCESS) {
- goto cleanup;
- }
+ PUT_YAMLSTR(target, (unsigned char *)namebuf,
+ strlen(namebuf), false);
} else {
ADD_STRING(target, namebuf);
}
ADD_STRING(target, "ZONE: ");
if (yaml) {
ADD_STRING(target, "\"");
- put_yamlstr(target, (unsigned char *)namebuf,
+ PUT_YAMLSTR(target, (unsigned char *)namebuf,
strlen(namebuf), false);
- if (result != ISC_R_SUCCESS) {
- goto cleanup;
- }
ADD_STRING(target, "\"");
} else {
ADD_STRING(target, namebuf);
ADD_STRING(target, sep2);
INDENT(style);
ADD_STRING(target, "PVALUE: \"");
- put_yamlstr(target, data, len, false);
+ PUT_YAMLSTR(target, data, len, false);
ADD_STRING(target, "\"");
} else {
ADD_STRING(target, " (\"");
} else {
ADD_STRING(target, "\"");
}
- put_yamlstr(target, optdata, optlen, utf8ok);
+ PUT_YAMLSTR(target, optdata, optlen, utf8ok);
if (!extra_text) {
ADD_STRING(target, "\")");
} else {