mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util functions.
This commit is contained in:
9
conf.c
9
conf.c
@@ -402,14 +402,7 @@ CNF_ReadFile(const char *filename)
|
||||
char line[2048];
|
||||
int i;
|
||||
|
||||
in = fopen(filename, "r");
|
||||
if (!in) {
|
||||
LOG_FATAL("Could not open configuration file %s : %s",
|
||||
filename, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG("Reading %s", filename);
|
||||
in = UTI_OpenFile(NULL, filename, NULL, 'R', 0);
|
||||
|
||||
for (i = 1; fgets(line, sizeof(line), in); i++) {
|
||||
CNF_ParseLine(filename, i, line);
|
||||
|
||||
Reference in New Issue
Block a user