diff options
| author | 2020-02-12 13:05:03 +0000 | |
|---|---|---|
| committer | 2020-02-12 13:05:03 +0000 | |
| commit | 3f2f3b21418bf66ce0c584cef36ad5a798a738f7 (patch) | |
| tree | 1e4e23ae444edbb6b0d77dc06f7a3fcd920ba950 /usr.bin/dig/lib/isc/buffer.c | |
| parent | Reorder to handle apm events and timeouts with the same code (diff) | |
| download | wireguard-openbsd-3f2f3b21418bf66ce0c584cef36ad5a798a738f7.tar.xz wireguard-openbsd-3f2f3b21418bf66ce0c584cef36ad5a798a738f7.zip | |
remove some unreferenced functions
ok florian@
Diffstat (limited to 'usr.bin/dig/lib/isc/buffer.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/buffer.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/usr.bin/dig/lib/isc/buffer.c b/usr.bin/dig/lib/isc/buffer.c index 17a0cffe979..9e4a8ee732c 100644 --- a/usr.bin/dig/lib/isc/buffer.c +++ b/usr.bin/dig/lib/isc/buffer.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: buffer.c,v 1.1 2020/02/07 09:58:53 florian Exp $ */ +/* $Id: buffer.c,v 1.2 2020/02/12 13:05:04 jsg Exp $ */ /*! \file */ @@ -49,25 +49,6 @@ isc__buffer_initnull(isc_buffer_t *b) { } void -isc_buffer_reinit(isc_buffer_t *b, void *base, unsigned int length) { - /* - * Re-initialize the buffer enough to reconfigure the base of the - * buffer. We will swap in the new buffer, after copying any - * data we contain into the new buffer and adjusting all of our - * internal pointers. - * - * The buffer must not be smaller than the length of the original - * buffer. - */ - REQUIRE(b->length <= length); - REQUIRE(base != NULL); - - (void)memmove(base, b->base, b->length); - b->base = base; - b->length = length; -} - -void isc__buffer_invalidate(isc_buffer_t *b) { /* * Make 'b' an invalid buffer. @@ -353,31 +334,6 @@ isc__buffer_putuint32(isc_buffer_t *b, uint32_t val) { ISC__BUFFER_PUTUINT32(b, val); } -uint64_t -isc_buffer_getuint48(isc_buffer_t *b) { - unsigned char *cp; - uint64_t result; - - /* - * Read an unsigned 48-bit integer in network byte order from 'b', - * convert it to host byte order, and return it. - */ - - REQUIRE(ISC_BUFFER_VALID(b)); - REQUIRE(b->used - b->current >= 6); - - cp = isc_buffer_current(b); - b->current += 6; - result = ((int64_t)(cp[0])) << 40; - result |= ((int64_t)(cp[1])) << 32; - result |= ((int64_t)(cp[2])) << 24; - result |= ((int64_t)(cp[3])) << 16; - result |= ((int64_t)(cp[4])) << 8; - result |= ((int64_t)(cp[5])); - - return (result); -} - void isc__buffer_putuint48(isc_buffer_t *b, uint64_t val) { uint16_t valhi; |
