Skip to content

Commit

Permalink
Fixed cycle caused by incorrectly reregistering break event
Browse files Browse the repository at this point in the history
  • Loading branch information
geky committed Jun 16, 2016
1 parent 1d0f10e commit f83507a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion events.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ int equeue_create_inplace(struct equeue *q,
q->free = (struct event*)buffer;
q->queue = 0;
q->next_id = 42;
q->break_ = (struct event){0};
q->break_ = (struct event){
.id = 0,
.period = -1,
};

if (q->free) {
for (unsigned i = 0; i < count-1; i++) {
Expand Down

0 comments on commit f83507a

Please sign in to comment.