mirror of https://gerrit.osmocom.org/libosmocore
timer: use timerclear() rather than explicit tv_set = tv_usec = 0
Change-Id: I2735fc8d19fd68ef2c14a31e83cb396dc2e05587
This commit is contained in:
parent
67bdd80a96
commit
0047602435
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue