summaryrefslogtreecommitdiffstats
path: root/log.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-09-24 14:01:10 +0100
committerThomas Adam <thomas@xteddy.org>2015-09-24 14:01:10 +0100
commitb0372840e7461089412a8ddf705533f9f72f1426 (patch)
tree4877ccbbd519f655a1171c58a90aa6cc458ee96a /log.c
parented17760a52a21c9a94719b8f729f2539a2ee6503 (diff)
parent2a62917444783e62ea5b8c13069aecb77b47ff07 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'log.c')
-rw-r--r--log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/log.c b/log.c
index bcf37cd2..c622d894 100644
--- a/log.c
+++ b/log.c
@@ -42,6 +42,9 @@ log_event_cb(unused int severity, const char *msg)
void
log_open(const char *path)
{
+ if (log_file != NULL)
+ fclose(log_file);
+
log_file = fopen(path, "w");
if (log_file == NULL)
return;