aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rtadvd/timer.c
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2003-08-08 16:56:01 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2003-08-08 16:56:01 +0000
commitfa19f9be0400bf0b77b89ad6940eb0675235db1c (patch)
tree178f6af642cf6aacbd3415e4286f66d0b9bd3bba /usr.sbin/rtadvd/timer.c
parent5ed8c16b882bf0cd10fa24e3dd8aacbe1b60d8bb (diff)
Notes
Diffstat (limited to 'usr.sbin/rtadvd/timer.c')
-rw-r--r--usr.sbin/rtadvd/timer.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.sbin/rtadvd/timer.c b/usr.sbin/rtadvd/timer.c
index 73b7fe1c4d42..f30fb3742ee4 100644
--- a/usr.sbin/rtadvd/timer.c
+++ b/usr.sbin/rtadvd/timer.c
@@ -1,5 +1,5 @@
/* $FreeBSD$ */
-/* $KAME: timer.c,v 1.4 2000/05/27 11:30:43 jinmei Exp $ */
+/* $KAME: timer.c,v 1.9 2002/06/10 19:59:47 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -45,7 +45,7 @@ static struct rtadvd_timer timer_head;
#define MILLION 1000000
#define TIMEVAL_EQUAL(t1,t2) ((t1)->tv_sec == (t2)->tv_sec &&\
- (t1)->tv_usec == (t2)->tv_usec)
+ (t1)->tv_usec == (t2)->tv_usec)
static struct timeval tm_max = {0x7fffffff, 0x7fffffff};
@@ -75,7 +75,7 @@ rtadvd_add_timer(struct rtadvd_timer *(*timeout) __P((void *)),
if (timeout == NULL) {
syslog(LOG_ERR,
- "<%s> timeout function unspecfied", __func__);
+ "<%s> timeout function unspecified", __func__);
exit(1);
}
newtimer->expire = timeout;
@@ -149,12 +149,10 @@ rtadvd_check_timer()
if (TIMEVAL_EQUAL(&tm_max, &timer_head.tm)) {
/* no need to timeout */
return(NULL);
- }
- else if (TIMEVAL_LT(timer_head.tm, now)) {
+ } else if (TIMEVAL_LT(timer_head.tm, now)) {
/* this may occur when the interval is too small */
returnval.tv_sec = returnval.tv_usec = 0;
- }
- else
+ } else
TIMEVAL_SUB(&timer_head.tm, &now, &returnval);
return(&returnval);
}