In general it is a mistake to provide a varargs function which takes a
format string, but not the corresponding function taking a va_list.
We implement slilog in terms of vslilog in the obvious way.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
log_msg_fn *log;
log_vmsg_fn *vlog;
};
-/* (convenience function, defined in util.c) */
+/* (convenience functions, defined in util.c) */
extern void slilog(struct log_if *lf, int class, const char *message, ...)
FORMAT(printf,3,4);
+extern void vslilog(struct log_if *lf, int class, const char *message, va_list)
+FORMAT(printf,3,0);
/* SITE interface */
return False;
}
+void vslilog(struct log_if *lf, int priority, const char *message, va_list ap)
+{
+ lf->vlog(lf->st,priority,message,ap);
+}
+
void slilog(struct log_if *lf, int priority, const char *message, ...)
{
va_list ap;
va_start(ap,message);
- lf->vlog(lf->st,priority,message,ap);
+ vslilog(lf,priority,message,ap);
va_end(ap);
}