diff options
| author | 2020-02-26 18:47:24 +0000 | |
|---|---|---|
| committer | 2020-02-26 18:47:24 +0000 | |
| commit | 637d8eb612a8d36569ff681fc1140eb404d28207 (patch) | |
| tree | 0ff7f4ec95835de121ef441ef94d709b65b2c42a /usr.bin/dig/lib/dns/rdata.c | |
| parent | Always printing unknown types as TYPE%u and not sometimes as %u (diff) | |
| download | wireguard-openbsd-637d8eb612a8d36569ff681fc1140eb404d28207.tar.xz wireguard-openbsd-637d8eb612a8d36569ff681fc1140eb404d28207.zip | |
In preparation of compiling lib/dns/rdata/ files individually we need
global visibility of mem_tobuffer.
Rename it to isc_mem_tobuffer, put it into buffer.c and delete
duplicate implementations.
Diffstat (limited to 'usr.bin/dig/lib/dns/rdata.c')
| -rw-r--r-- | usr.bin/dig/lib/dns/rdata.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/usr.bin/dig/lib/dns/rdata.c b/usr.bin/dig/lib/dns/rdata.c index f919a89855c..108f5c2f546 100644 --- a/usr.bin/dig/lib/dns/rdata.c +++ b/usr.bin/dig/lib/dns/rdata.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.27 2020/02/26 18:38:15 florian Exp $ */ +/* $Id: rdata.c,v 1.28 2020/02/26 18:47:24 florian Exp $ */ /*! \file */ @@ -127,9 +127,6 @@ static uint8_t uint8_consume_fromregion(isc_region_t *region); static isc_result_t -mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length); - -static isc_result_t btoa_totext(unsigned char *inbuf, int inbuflen, isc_buffer_t *target); static isc_result_t @@ -1381,22 +1378,6 @@ uint8_consume_fromregion(isc_region_t *region) { return r; } -static isc_result_t -mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) { - isc_region_t tr; - - if (length == 0U) - return (ISC_R_SUCCESS); - - isc_buffer_availableregion(target, &tr); - if (length > tr.length) - return (ISC_R_NOSPACE); - if (tr.base != base) - memmove(tr.base, base, length); - isc_buffer_add(target, length); - return (ISC_R_SUCCESS); -} - static const char atob_digits[86] = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`" \ "abcdefghijklmnopqrstu"; |
