diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-04-15 09:31:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-05-09 14:04:54 -0400 |
commit | 11a09778d67cba7f118a7425bda313316ac7ecc2 (patch) | |
tree | 192fc3002c00522ecb77ab3a7c7b2d4fd3e6cd47 /src/common/timers.c | |
parent | 10fd4535c2109c9532585aca2c429f741937364c (diff) | |
download | tor-11a09778d67cba7f118a7425bda313316ac7ecc2.tar.gz tor-11a09778d67cba7f118a7425bda313316ac7ecc2.zip |
Test coverage for timers.
Diffstat (limited to 'src/common/timers.c')
-rw-r--r-- | src/common/timers.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/timers.c b/src/common/timers.c index 58981b9588..5d8d1feafd 100644 --- a/src/common/timers.c +++ b/src/common/timers.c @@ -186,14 +186,16 @@ libevent_timer_callback(evutil_socket_t fd, short what, void *arg) void timers_initialize(void) { - if (global_timeouts) - return; + if (BUG(global_timeouts)) + return; // LCOV_EXCL_LINE timeout_error_t err; global_timeouts = timeouts_open(0, &err); if (!global_timeouts) { + // LCOV_EXCL_START -- this can only fail on malloc failure. log_err(LD_BUG, "Unable to open timer backend: %s", strerror(err)); tor_assert(0); + // LCOV_EXCL_STOP } struct event *timer_event; |