Download raw body.
npppd: remove redundant evtimer_del in FSM macro
While reading event_add(3), I noticed: "If the event in the ev argument
already has a scheduled timeout, the old timeout will be replaced by the
new one."
I grepped base for calls to evtimer_del() immediately before
evtimer_add() and found a redundant deletion inside an npppd FSM macro.
Since evtimer_add() handles pending timeouts internally, this extra call
can be removed.
OK?
diff --git usr.sbin/npppd/npppd/fsm.h usr.sbin/npppd/npppd/fsm.h
index 8fea751ceee..7b35ec60fb4 100644
--- usr.sbin/npppd/npppd/fsm.h
+++ usr.sbin/npppd/npppd/fsm.h
@@ -141,7 +141,6 @@ typedef struct fsm_callbacks {
evtimer_set(&(f)->timerctx.ev, fsm_evtimer_timeout,\
&(f)->timerctx); \
(f)->timerctx.func = fn; \
- evtimer_del(&(f)->timerctx.ev); \
evtimer_add(&(f)->timerctx.ev, &tv0); \
}
npppd: remove redundant evtimer_del in FSM macro