Browse Source

* f2b_logfile_close() : safer version

master
Alex 'AdUser' Z 8 years ago
parent
commit
31b7b9f9f7
  1. 6
      src/logfile.c

6
src/logfile.c

@ -41,8 +41,12 @@ f2b_logfile_open(f2b_logfile_t *file, const char *path) {
void
f2b_logfile_close(f2b_logfile_t *file) {
assert(file != NULL);
fclose(file->fd);
if (file->fd)
fclose(file->fd);
file->opened = false;
file->fd = NULL;
}
bool

Loading…
Cancel
Save