From: Stefan Metzmacher Date: Tue, 15 Oct 2019 08:15:14 +0000 (+0200) Subject: s3:lib: remove unused str_list_sub_basic() X-Git-Tag: ldb-2.1.0~601 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=848cd4c460a52c459bba5ff14a8b72f126378066;p=thirdparty%2Fsamba.git s3:lib: remove unused str_list_sub_basic() Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/source3/include/proto.h b/source3/include/proto.h index 223f45b69ee..bf0ea06aa9e 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -620,8 +620,6 @@ size_t strlen_m(const char *s); size_t strlen_m_term(const char *s); size_t strlen_m_term_null(const char *s); int fstr_sprintf(fstring s, const char *fmt, ...); -bool str_list_sub_basic( char **list, const char *smb_name, - const char *domain_name ); bool str_list_substitute(char **list, const char *pattern, const char *insert); char *ipstr_list_make(char **ipstr_list, diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index f3f2e1bc0e1..b5e08e0aa55 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -880,32 +880,3 @@ char *talloc_sub_full(TALLOC_CTX *ctx, TALLOC_FREE(a_string); return ret_string; } - -/****************************************************************************** - version of standard_sub_basic() for string lists; uses talloc_sub_basic() - for the work - *****************************************************************************/ - -bool str_list_sub_basic( char **list, const char *smb_name, - const char *domain_name ) -{ - TALLOC_CTX *ctx = list; - char *s, *tmpstr; - - while ( *list ) { - s = *list; - tmpstr = talloc_sub_basic(ctx, smb_name, domain_name, s); - if ( !tmpstr ) { - DEBUG(0,("str_list_sub_basic: " - "talloc_sub_basic() return NULL!\n")); - return false; - } - - TALLOC_FREE(*list); - *list = tmpstr; - - list++; - } - - return true; -}