summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-15 14:29:13 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-15 19:00:43 +0200
commit0047602435d3229cf065fb40822c0a5ef9c4380d (patch)
treeb14cc57a2bce47c115a6848d8f7aebee289c8e65 /src
parent67bdd80a96bdfc49d1aadbd32cca2b53f123d180 (diff)
timer: use timerclear() rather than explicit tv_set = tv_usec = 0
Change-Id: I2735fc8d19fd68ef2c14a31e83cb396dc2e05587
Diffstat (limited to 'src')
-rw-r--r--src/timer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/timer.c b/src/timer.c
index 47d1786b..a8cd42b8 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -190,8 +190,7 @@ static void update_nearest(struct timeval *cand, struct timeval *current)
timersub(cand, current, &nearest);
else {
/* loop again inmediately */
- nearest.tv_sec = 0;
- nearest.tv_usec = 0;
+ timerclear(&nearest);
}
nearest_p = &nearest;
} else {