conf: close file
This commit is contained in:
parent
04ef5ca902
commit
bf31594410
1 changed files with 4 additions and 3 deletions
|
@ -168,7 +168,7 @@ parse_line(const char line[BUFSIZ], char **key, char **value)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static void
|
||||||
conf_parse_file(const char *filename,
|
conf_parse_file(const char *filename,
|
||||||
void (*conf_keyvalue)(void *data, const char *key, const char *value),
|
void (*conf_keyvalue)(void *data, const char *key, const char *value),
|
||||||
void *data)
|
void *data)
|
||||||
|
@ -176,7 +176,7 @@ conf_parse_file(const char *filename,
|
||||||
FILE *f = fopen(filename, "r");
|
FILE *f = fopen(filename, "r");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_INFO, "Unable to open file: %s", filename);
|
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_INFO, "Unable to open file: %s", filename);
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
char line[BUFSIZ];
|
char line[BUFSIZ];
|
||||||
|
|
||||||
|
@ -200,7 +200,8 @@ conf_parse_file(const char *filename,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
fclose(f);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Reference in a new issue