mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 06:15:07 -05:00
conf: switch other_parse_error() to variable arguments
This commit is contained in:
12
conf.c
12
conf.c
@@ -363,11 +363,19 @@ command_parse_error(void)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
FORMAT_ATTRIBUTE_PRINTF(1, 2)
|
||||
static void
|
||||
other_parse_error(const char *message)
|
||||
other_parse_error(const char *format, ...)
|
||||
{
|
||||
char buf[256];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
vsnprintf(buf, sizeof (buf), format, ap);
|
||||
va_end(ap);
|
||||
|
||||
LOG_FATAL("%s at line %d%s%s",
|
||||
message, line_number, processed_file ? " in file " : "",
|
||||
buf, line_number, processed_file ? " in file " : "",
|
||||
processed_file ? processed_file : "");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user