Skip to content

Commit 723bd98

Browse files
authored
Merge pull request swiftlang#325 from Lukasa/cb-epollctl-init-take-2
Fully initialize ev.data.
2 parents e52c174 + b81442c commit 723bd98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/event/event_epoll.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,14 @@ _dispatch_timeout_program(uint32_t tidx, uint64_t target,
391391
dispatch_epoll_timeout_t timer = &_dispatch_epoll_timeout[clock];
392392
struct epoll_event ev = {
393393
.events = EPOLLONESHOT | EPOLLIN,
394-
.data = { .u32 = timer->det_ident },
394+
395395
};
396396
int op;
397397

398398
if (target >= INT64_MAX && !timer->det_registered) {
399399
return;
400400
}
401+
ev.data.u32 = timer->det_ident;
401402

402403
if (unlikely(timer->det_fd < 0)) {
403404
clockid_t clockid;

0 commit comments

Comments
 (0)