summaryrefslogtreecommitdiffstats
path: root/usr/klibc/asprintf.c
blob: 42f3aa2daeb85f563b0f1f2788f5baca75713820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * asprintf.c
 */

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

int asprintf(char **bufp, const char *format, ...)
{
	va_list ap;
	int rv;

	va_start(ap, format);
	rv = vasprintf(bufp, format, ap);
	va_end(ap);

	return rv;
}