]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove unused isc_string_regiondup function.
authorOndřej Surý <ondrej@sury.org>
Wed, 21 Mar 2018 16:40:42 +0000 (16:40 +0000)
committerOndřej Surý <ondrej@sury.org>
Thu, 12 Apr 2018 08:37:33 +0000 (10:37 +0200)
lib/isc/include/isc/string.h
lib/isc/string.c
lib/isc/win32/libisc.def.in

index eb9376039a7e6f8549fa51a13903d4f5e9b0997d..c32abb3aa4ebad2c667b18e83710e42ae674cef9 100644 (file)
 
 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);
 
index ddd9c8ca3f4373853eb0744aeade068287b8a450..01ceeb1775c5158382bb5c95cbd74d29d4769824 100644 (file)
 #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;
index d7dc4101e080d20abddf4908e0c84d7cac5db50c..a5f1960e951cdde3c4da044ca19ca9be5b2fa096 100644 (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