diff options
| author | 2020-02-26 18:47:58 +0000 | |
|---|---|---|
| committer | 2020-02-26 18:47:58 +0000 | |
| commit | 873f12b9e6aaf39ba104db6af3d0dc687cd95f7e (patch) | |
| tree | 80081a71df3f42a8248c43286fef79e79ede9a40 /usr.bin/dig/lib/dns/masterdump.c | |
| parent | In preparation of compiling lib/dns/rdata/ files individually we need (diff) | |
| download | wireguard-openbsd-873f12b9e6aaf39ba104db6af3d0dc687cd95f7e.tar.xz wireguard-openbsd-873f12b9e6aaf39ba104db6af3d0dc687cd95f7e.zip | |
In preparation of compiling lib/dns/rdata/ files individually we need
global visibility of str_totext.
Rename it to isc_str_tobuffer, put it into buffer.c and delete
duplicate implementations.
Diffstat (limited to 'usr.bin/dig/lib/dns/masterdump.c')
| -rw-r--r-- | usr.bin/dig/lib/dns/masterdump.c | 18 |
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, ®ion); - 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. |
