summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common.c')
-rw-r--r--common.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/common.c b/common.c
index 31d2c87..8be0428 100644
--- a/common.c
+++ b/common.c
@@ -61,17 +61,22 @@ void die(int ret, char *fmtstr, ...)
exit(ret);
}
-void errstr(char *fmtstr, ...)
+void errstrv(char *fmtstr, va_list args)
{
- va_list args;
-
- va_start(args, fmtstr);
if (enable_syslog)
do_syslog(LOG_ERR, fmtstr, args);
else {
fprintf(stderr, "%s: ", progname);
vfprintf(stderr, fmtstr, args);
}
+}
+
+void errstr(char *fmtstr, ...)
+{
+ va_list args;
+
+ va_start(args, fmtstr);
+ errstrv(fmtstr, args);
va_end(args);
}