11 va_copy(arg_list_copy, arg_list);
12 int l = vsnprintf(0, 0, fmt, arg_list_copy);
15 if(l < 0 || !(*
string =
malloc((
size_t)l + 1
U)))
20 return vsnprintf(*
string, (
size_t)l + 1
U, fmt, arg_list);
void * malloc(size_t size)
Allocates size bytes of uninitialized storage.
__builtin_va_list va_list
int vasprintf(char **string, const char *fmt, va_list arg_list)