summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/asprintf.c
blob: b868cce18c1aacb1bd403e356858a4cbd199c4a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
#include <stdarg.h>

int asprintf(char **restrict ptr, const char *restrict format, ...)
{
	int r;
	va_list ap;
	va_start(ap, format);
	r = vasprintf(ptr, format, ap);
	va_end(ap);
	return r;
}