diff options
Diffstat (limited to 'usr.bin/dig/lib/isc/buffer.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/buffer.c | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/usr.bin/dig/lib/isc/buffer.c b/usr.bin/dig/lib/isc/buffer.c index 5a5bd276775..e962a063de5 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.3 2020/02/18 18:11:27 florian Exp $ */ +/* $Id: buffer.c,v 1.4 2020/02/22 19:47:06 jung Exp $ */ /*! \file */ @@ -39,16 +39,6 @@ isc__buffer_init(isc_buffer_t *b, void *base, unsigned int length) { } void -isc__buffer_initnull(isc_buffer_t *b) { - /* - * Initialize a new buffer which has no backing store. This can - * later be grown as needed and swapped in place. - */ - - ISC__BUFFER_INIT(b, NULL, 0); -} - -void isc__buffer_invalidate(isc_buffer_t *b) { /* * Make 'b' an invalid buffer. @@ -60,17 +50,6 @@ isc__buffer_invalidate(isc_buffer_t *b) { } void -isc__buffer_region(isc_buffer_t *b, isc_region_t *r) { - /* - * Make 'r' refer to the region of 'b'. - */ - - REQUIRE(r != NULL); - - ISC__BUFFER_REGION(b, r); -} - -void isc__buffer_usedregion(isc_buffer_t *b, isc_region_t *r) { /* * Make 'r' refer to the used region of 'b'. @@ -124,17 +103,6 @@ isc__buffer_clear(isc_buffer_t *b) { } void -isc__buffer_consumedregion(isc_buffer_t *b, isc_region_t *r) { - /* - * Make 'r' refer to the consumed region of 'b'. - */ - - REQUIRE(r != NULL); - - ISC__BUFFER_CONSUMEDREGION(b, r); -} - -void isc__buffer_remainingregion(isc_buffer_t *b, isc_region_t *r) { /* * Make 'r' refer to the remaining region of 'b'. @@ -188,17 +156,6 @@ isc__buffer_forward(isc_buffer_t *b, unsigned int n) { } void -isc__buffer_back(isc_buffer_t *b, unsigned int n) { - /* - * Decrease the 'consumed' region of 'b' by 'n' bytes. - */ - - REQUIRE(n <= b->current); - - ISC__BUFFER_BACK(b, n); -} - -void isc_buffer_compact(isc_buffer_t *b) { unsigned int length; void *src; @@ -273,13 +230,6 @@ isc__buffer_putuint16(isc_buffer_t *b, uint16_t val) { ISC__BUFFER_PUTUINT16(b, val); } -void -isc__buffer_putuint24(isc_buffer_t *b, uint32_t val) { - REQUIRE(b->used + 3 <= b->length); - - ISC__BUFFER_PUTUINT24(b, val); -} - uint32_t isc_buffer_getuint32(isc_buffer_t *b) { unsigned char *cp; |
