diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2011-03-22 10:16:24 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2011-03-22 10:16:24 +0000 |
commit | f96dfa13e2e32079a84f0671399cd4ea025b9692 (patch) | |
tree | 316c38084fdd1cbfb93282b96970a7e589880ce0 /usr.sbin/rtadvd/timer.c | |
parent | 9eec10ca91344ea38ad949d967ef2dc9098c30a6 (diff) |
use timerclear macro
ok miod@
Diffstat (limited to 'usr.sbin/rtadvd/timer.c')
-rw-r--r-- | usr.sbin/rtadvd/timer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rtadvd/timer.c b/usr.sbin/rtadvd/timer.c index 055b6e93d43..d9ad519e4ca 100644 --- a/usr.sbin/rtadvd/timer.c +++ b/usr.sbin/rtadvd/timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: timer.c,v 1.9 2008/04/21 20:40:55 rainer Exp $ */ +/* $OpenBSD: timer.c,v 1.10 2011/03/22 10:16:23 okan Exp $ */ /* $KAME: timer.c,v 1.7 2002/05/21 14:26:55 itojun Exp $ */ /* @@ -143,7 +143,7 @@ rtadvd_check_timer() return(NULL); } else if (TIMEVAL_LT(timer_head.tm, now)) { /* this may occur when the interval is too small */ - returnval.tv_sec = returnval.tv_usec = 0; + timerclear(&returnval); } else TIMEVAL_SUB(&timer_head.tm, &now, &returnval); return(&returnval); @@ -157,7 +157,7 @@ rtadvd_timer_rest(struct rtadvd_timer *timer) gettimeofday(&now, NULL); if (TIMEVAL_LEQ(timer->tm, now)) { log_debug("a timer must be expired, but not yet"); - returnval.tv_sec = returnval.tv_usec = 0; + timerclear(&returnval); } else TIMEVAL_SUB(&timer->tm, &now, &returnval); |