diff options
Diffstat (limited to 'source/lib/talloc.c')
-rw-r--r-- | source/lib/talloc.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/source/lib/talloc.c b/source/lib/talloc.c index f5e21299b5a..cafe0654790 100644 --- a/source/lib/talloc.c +++ b/source/lib/talloc.c @@ -338,19 +338,6 @@ char *talloc_strdup(TALLOC_CTX *t, const char *p) return NULL; } -/* strndup with a talloc */ -char *talloc_strndup(TALLOC_CTX *mem_ctx, const char *str, size_t maxlen) -{ - size_t len = strnlen(str, maxlen); - void *ret = TALLOC(mem_ctx, len+1); - - if (ret != NULL) { - memcpy(ret, str, len); - ((char *)ret)[len] = '\0'; - } - return ret; -} - /** strdup_upper with a talloc */ char *talloc_strdup_upper(TALLOC_CTX *t, const char *p) { |