The branch, master has been updated via 0c61dd1 lib/util: Expose strv_addn() for adding string with specified length from eb5cdce samba-tool: Support preloading multiple users
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 0c61dd15137b4603bd47b3d6ae18ded6bd18ffae Author: Martin Schwenke <mar...@meltin.net> Date: Thu Feb 25 15:35:44 2016 +1100 lib/util: Expose strv_addn() for adding string with specified length This is just a rename of previously static function _strv_append(). strv is now more useful for parsing. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Volker Lendecke <v...@samba.org> Autobuild-User(master): Volker Lendecke <v...@samba.org> Autobuild-Date(master): Thu Feb 25 13:43:31 CET 2016 on sn-devel-144 ----------------------------------------------------------------------- Summary of changes: lib/util/strv.c | 7 +++---- lib/util/strv.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/strv.c b/lib/util/strv.c index f5879c7..fab3e56 100644 --- a/lib/util/strv.c +++ b/lib/util/strv.c @@ -22,8 +22,7 @@ #include "talloc.h" #include <string.h> -static int _strv_append(TALLOC_CTX *mem_ctx, char **dst, const char *src, - size_t srclen) +int strv_addn(TALLOC_CTX *mem_ctx, char **dst, const char *src, size_t srclen) { size_t dstlen = talloc_array_length(*dst); size_t newlen = dstlen + srclen; @@ -45,12 +44,12 @@ static int _strv_append(TALLOC_CTX *mem_ctx, char **dst, const char *src, int strv_add(TALLOC_CTX *mem_ctx, char **strv, const char *string) { - return _strv_append(mem_ctx, strv, string, strlen(string)+1); + return strv_addn(mem_ctx, strv, string, strlen(string)+1); } int strv_append(TALLOC_CTX *mem_ctx, char **strv, const char *src) { - return _strv_append(mem_ctx, strv, src, talloc_array_length(src)); + return strv_addn(mem_ctx, strv, src, talloc_array_length(src)); } static bool strv_valid_entry(const char *strv, const char *entry, diff --git a/lib/util/strv.h b/lib/util/strv.h index 843ce5c..fb1a806 100644 --- a/lib/util/strv.h +++ b/lib/util/strv.h @@ -23,6 +23,7 @@ #include "talloc.h" int strv_add(TALLOC_CTX *mem_ctx, char **strv, const char *string); +int strv_addn(TALLOC_CTX *mem_ctx, char **dst, const char *src, size_t srclen); int strv_append(TALLOC_CTX *mem_ctx, char **strv, const char *src); char *strv_next(char *strv, const char *entry); char *strv_find(char *strv, const char *entry); -- Samba Shared Repository