summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig/lib/dns/masterdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/dig/lib/dns/masterdump.c')
-rw-r--r--usr.bin/dig/lib/dns/masterdump.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/usr.bin/dig/lib/dns/masterdump.c b/usr.bin/dig/lib/dns/masterdump.c
index ac2396456e4..771720bb09b 100644
--- a/usr.bin/dig/lib/dns/masterdump.c
+++ b/usr.bin/dig/lib/dns/masterdump.c
@@ -227,22 +227,6 @@ totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx) {
return (result); \
} while (0)
-static isc_result_t
-str_totext(const char *source, isc_buffer_t *target) {
- unsigned int l;
- isc_region_t region;
-
- isc_buffer_availableregion(target, &region);
- l = strlen(source);
-
- if (l > region.length)
- return (ISC_R_NOSPACE);
-
- memmove(region.base, source, l);
- isc_buffer_add(target, l);
- return (ISC_R_SUCCESS);
-}
-
/*
* Convert 'rdataset' to master file text format according to 'ctx',
* storing the result in 'target'. If 'owner_name' is NULL, it
@@ -278,7 +262,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
* Comment?
*/
if ((ctx->style.flags & DNS_STYLEFLAG_COMMENTDATA) != 0)
- RETERR(str_totext(";", target));
+ RETERR(isc_str_tobuffer(";", target));
/*
* Owner name.