commit 91aeb01dcef28aea6e15ba7d1c9a094d01dfc41e
parent 824dae147e8c89465e09709764601d7d80dff819
Author: Alexis <surryhill@gmail.com>
Date: Thu, 26 Nov 2015 15:20:09 +0100
Refactor die() to use eprintf()
Diffstat:
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sent.c b/sent.c
@@ -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);
}