Skip to content

Commit

Permalink
timer: don't use odp_timer_set_t
Browse files Browse the repository at this point in the history
odp_timer_set_t has been removed, don't use it. This also fixes a
mistake made in an earlier commit, where the return value of
odp_timer_start(), which is int, was assigned to a variable of type
odp_timer_set_t.

Fixes: db2601f ("timer: Use odp_timer_start() instead of odp_timer_set_abs()")

Signed-off-by: Jere Leppänen <[email protected]>
Reviewed-by: Janne Peltonen <[email protected]>
  • Loading branch information
JereLeppanen committed Oct 14, 2024
1 parent 247b35a commit addd8a3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ofp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ odp_timer_t ofp_timer_start_cpu_id(uint64_t tmo_us, ofp_timer_callback callback,
uint64_t period_ns;
struct ofp_timer_internal *bufdata;
odp_buffer_t buf;
odp_timer_set_t t;
odp_timeout_t tmo;

/* Init shm if not done yet. */
Expand Down Expand Up @@ -432,9 +431,8 @@ odp_timer_t ofp_timer_start_cpu_id(uint64_t tmo_us, ofp_timer_callback callback,
param.tick_type = ODP_TIMER_TICK_ABS;
param.tick = tick;
param.tmo_ev = bufdata->t_ev;
t = odp_timer_start(timer, &param);

if (t != ODP_TIMER_SUCCESS) {
if (odp_timer_start(timer, &param) != ODP_TIMER_SUCCESS) {
odp_timer_free(timer);
odp_timeout_free(tmo);
odp_buffer_free(buf);
Expand Down

0 comments on commit addd8a3

Please sign in to comment.