From: Ondřej Surý Date: Wed, 21 Mar 2018 16:40:42 +0000 (+0000) Subject: Remove unused isc_string_regiondup function. X-Git-Tag: v9.13.0~60^2~6 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b9552250cb35e82122605e1530d957087a1f8782;p=thirdparty%2Fbind9.git Remove unused isc_string_regiondup function. --- diff --git a/lib/isc/include/isc/string.h b/lib/isc/include/isc/string.h index eb9376039a7..c32abb3aa4e 100644 --- a/lib/isc/include/isc/string.h +++ b/lib/isc/include/isc/string.h @@ -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); diff --git a/lib/isc/string.c b/lib/isc/string.c index ddd9c8ca3f4..01ceeb1775c 100644 --- a/lib/isc/string.c +++ b/lib/isc/string.c @@ -50,22 +50,6 @@ #include #include -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; diff --git a/lib/isc/win32/libisc.def.in b/lib/isc/win32/libisc.def.in index d7dc4101e08..a5f1960e951 100644 --- a/lib/isc/win32/libisc.def.in +++ b/lib/isc/win32/libisc.def.in @@ -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