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

int snprintf(char *restrict s, size_t n, const char *restrict format, ...)
{
	int r;
	va_list ap;
	va_start(ap, format);
	r = vsnprintf(s, n, format, ap);
	va_end(ap);
	return r;
}