Refactor die() to use eprintf()

This commit is contained in:
Alexis 2015-11-26 15:20:09 +01:00 committed by Markus Teich
parent 824dae147e
commit 91aeb01dce

8
sent.c
View File

@ -376,15 +376,9 @@ void die(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
eprintf(fmt, ap);
va_end(ap);
if (fmt[0] != '\0' && fmt[strlen(fmt)-1] == ':') {
fputc(' ', stderr);
perror(NULL);
} else {
fputc('\n', stderr);
}
exit(1);
}