Review at https://gerrit.osmocom.org/2632
timer: use timerclear() rather than explicit tv_set = tv_usec = 0
Change-Id: I2735fc8d19fd68ef2c14a31e83cb396dc2e05587
---
M src/timer.c
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/2632/1
diff --git a/src/timer.c b/src/timer.c
index 47d1786..a8cd42b 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -190,8 +190,7 @@
timersub(cand, current, &nearest);
else {
/* loop again inmediately */
- nearest.tv_sec = 0;
- nearest.tv_usec = 0;
+ timerclear(&nearest);
}
nearest_p = &nearest;
} else {
--
To view, visit https://gerrit.osmocom.org/2632
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2735fc8d19fd68ef2c14a31e83cb396dc2e05587
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>