aboutsummaryrefslogtreecommitdiff
path: root/lib/errors/vwarn.c
blob: 99b2c9b63c11cef27e0030a216b3f7da97d584b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>

#include "errors.h"

void
vwarn(const char *fmt, va_list ap)
{
	int save = errno;
	fprintf(stderr, "%s: ", mlib_progname());
	vfprintf(stderr, fmt, ap);
	fprintf(stderr, ": %s\n", strerror(save));
}