mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 12:25:06 -05:00
conf: allow NULL as filename
This commit is contained in:
15
conf.c
15
conf.c
@@ -255,8 +255,9 @@ static const char *processed_command;
|
|||||||
static void
|
static void
|
||||||
command_parse_error(void)
|
command_parse_error(void)
|
||||||
{
|
{
|
||||||
LOG_FATAL(LOGF_Configure, "Could not parse %s directive at line %d in file %s",
|
LOG_FATAL(LOGF_Configure, "Could not parse %s directive at line %d%s%s",
|
||||||
processed_command, line_number, processed_file);
|
processed_command, line_number, processed_file ? " in file " : "",
|
||||||
|
processed_file ? processed_file : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
@@ -264,8 +265,9 @@ command_parse_error(void)
|
|||||||
static void
|
static void
|
||||||
other_parse_error(const char *message)
|
other_parse_error(const char *message)
|
||||||
{
|
{
|
||||||
LOG_FATAL(LOGF_Configure, "%s at line %d in file %s",
|
LOG_FATAL(LOGF_Configure, "%s at line %d%s%s",
|
||||||
message, line_number, processed_file);
|
message, line_number, processed_file ? " in file " : "",
|
||||||
|
processed_file ? processed_file : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
@@ -283,9 +285,10 @@ check_number_of_args(char *line, int num)
|
|||||||
num--;
|
num--;
|
||||||
}
|
}
|
||||||
if (num) {
|
if (num) {
|
||||||
LOG_FATAL(LOGF_Configure, "%s arguments for %s directive at line %d in file %s",
|
LOG_FATAL(LOGF_Configure, "%s arguments for %s directive at line %d%s%s",
|
||||||
num > 0 ? "Missing" : "Too many",
|
num > 0 ? "Missing" : "Too many",
|
||||||
processed_command, line_number, processed_file);
|
processed_command, line_number, processed_file ? " in file " : "",
|
||||||
|
processed_file ? processed_file : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user