Skip to content

Commit

Permalink
trace: init refactor (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers authored Jun 6, 2022
1 parent 0bea0bb commit 265546f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static struct {
bool init;
uint64_t start_time;
} trace = {
.init = true
.init = false
};


Expand Down Expand Up @@ -153,6 +153,7 @@ int re_trace_close(void)
trace.event_buffer = mem_deref(trace.event_buffer);
trace.event_buffer_flush = mem_deref(trace.event_buffer_flush);
mtx_destroy(&trace.lock);
trace.init = false;

(void)re_fprintf(trace.f, "\n\t]\n}\n");
if (trace.f)
Expand Down

0 comments on commit 265546f

Please sign in to comment.