1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

Talloc doc: talloc_strndup_append()

The destination string is reallocated instead of duplicating the result.
This commit is contained in:
Pavel Březina 2012-04-16 13:12:41 +02:00 committed by Volker Lendecke
parent 3502371a34
commit c5243a499f

View File

@ -1373,8 +1373,17 @@ char *talloc_strdup_append_buffer(char *s, const char *a);
char *talloc_strndup(const void *t, const char *p, size_t n);
/**
* @brief Append at most n characters of a string to given string and duplicate
* the result.
* @brief Append at most n characters of a string to given string.
*
* The destination string is reallocated to take
* <code>strlen(s) + strnlen(a, n) + 1</code> characters.
*
* This functions sets the name of the new pointer to the new
* string. This is equivalent to:
*
* @code
* talloc_set_name_const(ptr, ptr)
* @endcode
*
* @param[in] s The destination string to append to.
*
@ -1386,6 +1395,7 @@ char *talloc_strndup(const void *t, const char *p, size_t n);
* @return The duplicated string, NULL on error.
*
* @see talloc_strndup()
* @see talloc_strndup_append_buffer()
*/
char *talloc_strndup_append(char *s, const char *a, size_t n);