Skip to content

Commit

Permalink
fix: test.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Jun 9, 2023
1 parent fe2e7c4 commit 69bf5ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Lib/core/poll/kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ int poll_create(poll_priv_t *priv) {
}

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

/* Eventually alloc kqueue data if needed */
Expand Down Expand Up @@ -53,7 +52,7 @@ int poll_set_new_evt(poll_priv_t *priv, ev_src_t *tmp, const enum op_type flag)
#else
const int flags = 0; // unsupported...
#endif
EV_SET(_ev, timer_ids++, EVFILT_TIMER, f, flags | NOTE_NSECONDS, tmp->tmr_src.its.ns, tmp);
EV_SET(_ev, tmp->tmr_src.its.ns, EVFILT_TIMER, f, flags | NOTE_NSECONDS, tmp->tmr_src.its.ns, tmp);
break;
}
case M_SRC_TYPE_SGN:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void test_mod_srcs(void **state) {
(void) state; /* unused */

// 1000s just to test
const m_src_tmr_t my_tmr = {.ns = 1000000000000 };
const m_src_tmr_t my_tmr = {.ns = 5000 };

int ret = m_mod_src_register_tmr(test_mod, &my_tmr, M_SRC_FD_AUTOCLOSE, NULL);
assert_true(ret == 0);
Expand Down

0 comments on commit 69bf5ab

Please sign in to comment.