timer: use timerclear() rather than explicit tv_set = tv_usec = 0

Change-Id: I2735fc8d19fd68ef2c14a31e83cb396dc2e05587
This commit is contained in:
Harald Welte 2017-05-15 14:29:13 +02:00
parent 67bdd80a96
commit 0047602435
1 changed files with 1 additions and 2 deletions

View File

@ -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 {