aboutsummaryrefslogtreecommitdiff
path: root/lib/errors/vwarn.c
blob: bc6bd1637749c84a37b4fbaa1b9a443e614e878d (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: ", progname());
	vfprintf(stderr, fmt, ap);
	fprintf(stderr, ": %s\n", strerror(save));
}