2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

implement isc_dynbuffer_reset()

This commit is contained in:
Michael Graff 1999-04-29 05:59:51 +00:00
parent c45abd11bb
commit 84d79ecd50
2 changed files with 15 additions and 0 deletions

View File

@ -379,6 +379,14 @@ isc_dynbuffer_allocate(isc_mem_t *mctx, isc_dynbuffer_t **dynbuffer,
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
void
isc_dynbuffer_reset(isc_dynbuffer_t *dynbuffer)
{
REQUIRE(VALID_DYNBUFFER(dynbuffer));
isc_buffer_clear(&dynbuffer->buffer);
}
void void
isc_dynbuffer_free(isc_mem_t *mctx, isc_dynbuffer_t **dynbuffer) isc_dynbuffer_free(isc_mem_t *mctx, isc_dynbuffer_t **dynbuffer)
{ {

View File

@ -171,6 +171,13 @@ isc_dynbuffer_allocate(isc_mem_t *mctx, isc_dynbuffer_t **dynbuffer,
* ISC_R_NOMEMORY - no memory available * ISC_R_NOMEMORY - no memory available
*/ */
void
isc_dynbuffer_reset(isc_dynbuffer_t *dynbuffer);
/*
* Reset the dynamic buffer to the initial state
*/
void void
isc_dynbuffer_free(isc_mem_t *mctx, isc_dynbuffer_t **dynbuffer); isc_dynbuffer_free(isc_mem_t *mctx, isc_dynbuffer_t **dynbuffer);
/* /*