summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2011-03-15 08:38:08 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2011-03-15 08:38:08 +0000
commit241843c46debc7f7180362722ea5e4087a000eea (patch)
tree367dc7cc571a9c979c2b41961918e11dc6257ae6
parentbe64fa04526f89b15930f6fecfda3398b79409dd (diff)
use appropriate timerclear macro - from Christiano F. Haesbaert
ok mcbride@
-rw-r--r--usr.sbin/ifstated/ifstated.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/ifstated/ifstated.c b/usr.sbin/ifstated/ifstated.c
index 8e7a4065e85..33353407b3e 100644
--- a/usr.sbin/ifstated/ifstated.c
+++ b/usr.sbin/ifstated/ifstated.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifstated.c,v 1.38 2010/07/07 21:52:00 stsp Exp $ */
+/* $OpenBSD: ifstated.c,v 1.39 2011/03/15 08:38:07 okan Exp $ */
/*
* Copyright (c) 2004 Marco Pfatschbacher <mpf@openbsd.org>
@@ -144,8 +144,7 @@ main(int argc, char *argv[])
signal_add(&sigchld_ev, NULL);
/* Loading the config needs to happen in the event loop */
- tv.tv_usec = 0;
- tv.tv_sec = 0;
+ timerclear(&tv);
evtimer_set(&startup_ev, startup_handler, NULL);
evtimer_add(&startup_ev, &tv);
@@ -252,7 +251,7 @@ external_handler(int fd, short event, void *arg)
struct timeval tv;
/* re-schedule */
- tv.tv_usec = 0;
+ timerclear(&tv);
tv.tv_sec = external->frequency;
evtimer_set(&external->ev, external_handler, external);
evtimer_add(&external->ev, &tv);
@@ -382,7 +381,7 @@ external_evtimer_setup(struct ifsd_state *state, int action)
external_exec(external, 0);
/* schedule it for later */
- tv.tv_usec = 0;
+ timerclear(&tv);
tv.tv_sec = external->frequency;
evtimer_set(&external->ev, external_handler,
external);