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); timersub(cand, current, &nearest);
else { else {
/* loop again inmediately */ /* loop again inmediately */
nearest.tv_sec = 0; timerclear(&nearest);
nearest.tv_usec = 0;
} }
nearest_p = &nearest; nearest_p = &nearest;
} else { } else {