mirror of
https://github.com/samba-team/samba.git
synced 2025-12-06 16:23:49 +03:00
r1199: Make talloc_asprintf_append() work on a NULL source string as if it were
just a alloc_asprintf(). (makes it easier to use in a loop) Andrew Bartlett
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
58da78a746
commit
5816d09c47
@@ -464,7 +464,11 @@ char *talloc_strndup(TALLOC_CTX *t, const char *p, size_t n)
|
||||
|
||||
VA_COPY(ap2, ap);
|
||||
|
||||
s_len = strlen(s);
|
||||
if (s) {
|
||||
s_len = strlen(s);
|
||||
} else {
|
||||
s = 0;
|
||||
}
|
||||
len = vsnprintf(NULL, 0, fmt, ap2);
|
||||
|
||||
s = talloc_realloc(t, s, s_len + len+1);
|
||||
|
||||
Reference in New Issue
Block a user