summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/sprintf.c
blob: a0ed7bf11e4eefebaf4be7da5ee1d08999f6abfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdarg.h> // for va_end, va_start
#include <stdio.h>  // for sprintf, vsprintf, va_list

int sprintf(char *restrict s, const char *restrict format, ...)
{
	int r;
	va_list ap;
	va_start(ap, format);
	r = vsprintf(s, format, ap);
	va_end(ap);
	return r;
}