Skip to content

Commit 69bf5ab

Browse files
committed
fix: test.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
1 parent fe2e7c4 commit 69bf5ab

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Lib/core/poll/kqueue.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ int poll_create(poll_priv_t *priv) {
2121
}
2222

2323
int poll_set_new_evt(poll_priv_t *priv, ev_src_t *tmp, const enum op_type flag) {
24-
static int timer_ids = 1;
2524
GET_PRIV_DATA();
2625

2726
/* Eventually alloc kqueue data if needed */
@@ -53,7 +52,7 @@ int poll_set_new_evt(poll_priv_t *priv, ev_src_t *tmp, const enum op_type flag)
5352
#else
5453
const int flags = 0; // unsupported...
5554
#endif
56-
EV_SET(_ev, timer_ids++, EVFILT_TIMER, f, flags | NOTE_NSECONDS, tmp->tmr_src.its.ns, tmp);
55+
EV_SET(_ev, tmp->tmr_src.its.ns, EVFILT_TIMER, f, flags | NOTE_NSECONDS, tmp->tmr_src.its.ns, tmp);
5756
break;
5857
}
5958
case M_SRC_TYPE_SGN:

tests/test_mod.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ void test_mod_srcs(void **state) {
266266
(void) state; /* unused */
267267

268268
// 1000s just to test
269-
const m_src_tmr_t my_tmr = {.ns = 1000000000000 };
269+
const m_src_tmr_t my_tmr = {.ns = 5000 };
270270

271271
int ret = m_mod_src_register_tmr(test_mod, &my_tmr, M_SRC_FD_AUTOCLOSE, NULL);
272272
assert_true(ret == 0);

0 commit comments

Comments
 (0)