summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/snprintf.c
blob: 49204437373704f838c96739d075cc8feead4816 (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 snprintf, vsnprintf, size_t, va_list

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;
}