diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-20 10:42:06 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-20 10:42:06 -0400 |
commit | 8865972a0b18a2fdcf42b55149989d0705c85577 (patch) | |
tree | c7bc0dfc81b2a96eab9d91fb9adbcd495f591933 | |
parent | 90aeaa53cd3f6cf347cc0629db38079bc90ea80b (diff) | |
download | tor-8865972a0b18a2fdcf42b55149989d0705c85577.tar.gz tor-8865972a0b18a2fdcf42b55149989d0705c85577.zip |
Use raw_assert in tor_gettimeofday
We don't want to actually be calling logs when gettimeofday() fails,
since we need gettimeofday() to log.
-rw-r--r-- | src/common/compat_time.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/common/compat_time.c b/src/common/compat_time.c index ed0a1550fa..5c70674615 100644 --- a/src/common/compat_time.c +++ b/src/common/compat_time.c @@ -99,10 +99,9 @@ tor_gettimeofday, (struct timeval *timeval)) #elif defined(HAVE_GETTIMEOFDAY) if (gettimeofday(timeval, NULL)) { /* LCOV_EXCL_START */ - log_err(LD_GENERAL,"gettimeofday failed."); /* If gettimeofday dies, we have either given a bad timezone (we didn't), or segfaulted.*/ - exit(1); // exit ok: gettimeofday failed. + raw_assert_unreached_msg("gettimeofday failed"); /* LCOV_EXCL_STOP */ } #elif defined(HAVE_FTIME) @@ -900,4 +899,3 @@ monotime_msec_to_approx_coarse_stamp_units(uint64_t msec) return (msec * STAMP_TICKS_PER_SECOND) / 1000; } #endif - |