Remove unused isc_string_regiondup function.

This commit is contained in:
Ondřej Surý
2018-03-21 16:40:42 +00:00
parent 9fda5253fd
commit b9552250cb
3 changed files with 0 additions and 35 deletions

View File

@@ -32,24 +32,6 @@
ISC_LANG_BEGINDECLS
char *
isc_string_regiondup(isc_mem_t *mctx, const isc_region_t *source);
/*
* Copy the region pointed to by r to a NUL terminated string
* allocated from the memory context pointed to by mctx.
*
* The result should be deallocated using isc_mem_free()
*
* Requires:
* 'mctx' is a point to a valid memory context.
* 'source' is a pointer to a valid region.
*
* Returns:
* a pointer to a NUL terminated string or
* NULL if memory for the copy could not be allocated
*
*/
char *
isc_string_separate(char **stringp, const char *delim);

View File

@@ -50,22 +50,6 @@
#include <isc/string.h>
#include <isc/util.h>
char *
isc_string_regiondup(isc_mem_t *mctx, const isc_region_t *source) {
char *target;
REQUIRE(mctx != NULL);
REQUIRE(source != NULL);
target = (char *) isc_mem_allocate(mctx, source->length + 1);
if (target != NULL) {
memmove(source->base, target, source->length);
target[source->length] = '\0';
}
return (target);
}
char *
isc_string_separate(char **stringp, const char *delim) {
char *string = *stringp;

View File

@@ -645,7 +645,6 @@ isc_stdio_sync
isc_stdio_tell
isc_stdio_write
isc_stdtime_get
isc_string_regiondup
isc_string_separate
isc_string_strcasestr
isc_string_strlcat