diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-22 10:50:12 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-22 10:50:14 -0400 |
commit | b2d4e786b7ed2563461513e36c7e75bea1f70be8 (patch) | |
tree | f5580d1c69ee16e5ce9bbbc4129b1e3751ef601c /src/lib/ctime | |
parent | da4ae8a6b6bc45f301c1493bb55b09e2f1209ac2 (diff) | |
download | tor-b2d4e786b7ed2563461513e36c7e75bea1f70be8.tar.gz tor-b2d4e786b7ed2563461513e36c7e75bea1f70be8.zip |
Remove the util_bug.h include from smartlist.h.
This change makes a whole bunch of things in torlog.c break, since
apparently I did not find all the fd dependencies.
Diffstat (limited to 'src/lib/ctime')
-rw-r--r-- | src/lib/ctime/.may_include | 5 | ||||
-rw-r--r-- | src/lib/ctime/di_ops.c | 17 |
2 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/ctime/.may_include b/src/lib/ctime/.may_include index 72d854c374..e74669bce1 100644 --- a/src/lib/ctime/.may_include +++ b/src/lib/ctime/.may_include @@ -1,6 +1,5 @@ orconfig.h lib/cc/*.h lib/ctime/*.h - -# XXXX I'd like to remove this -common/util.h +lib/err/*.h +lib/malloc/*.h diff --git a/src/lib/ctime/di_ops.c b/src/lib/ctime/di_ops.c index 407131c448..287ff6080a 100644 --- a/src/lib/ctime/di_ops.c +++ b/src/lib/ctime/di_ops.c @@ -8,7 +8,10 @@ #include "orconfig.h" #include "lib/ctime/di_ops.h" -#include "common/util.h" +#include "lib/err/torerr.h" +#include "lib/malloc/util_malloc.h" + +#include <string.h> /** * Timing-safe version of memcmp. As memcmp, compare the <b>sz</b> bytes at @@ -170,8 +173,8 @@ dimap_add_entry(di_digest256_map_t **map, di_digest256_map_t *new_ent; { void *old_val = dimap_search(*map, key, NULL); - tor_assert(! old_val); - tor_assert(val); + raw_assert(! old_val); + raw_assert(val); } new_ent = tor_malloc_zero(sizeof(di_digest256_map_t)); new_ent->next = *map; @@ -263,10 +266,10 @@ select_array_member_cumulative_timei(const uint64_t *entries, int n_entries, rand_val = INT64_MAX; } } - tor_assert(total_so_far == total); - tor_assert(n_chosen == 1); - tor_assert(i_chosen >= 0); - tor_assert(i_chosen < n_entries); + raw_assert(total_so_far == total); + raw_assert(n_chosen == 1); + raw_assert(i_chosen >= 0); + raw_assert(i_chosen < n_entries); return i_chosen; } |