[MERGED] libosmocore[master]: timer: use timerclear() rather than explicit tv_set = tv_use...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon May 15 17:07:01 UTC 2017


Harald Welte has submitted this change and it was merged.

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


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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: I2735fc8d19fd68ef2c14a31e83cb396dc2e05587
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list