summaryrefslogtreecommitdiff
path: root/src/lib/ctime/di_ops.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-22 10:50:12 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-22 10:50:14 -0400
commitb2d4e786b7ed2563461513e36c7e75bea1f70be8 (patch)
treef5580d1c69ee16e5ce9bbbc4129b1e3751ef601c /src/lib/ctime/di_ops.c
parentda4ae8a6b6bc45f301c1493bb55b09e2f1209ac2 (diff)
downloadtor-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/di_ops.c')
-rw-r--r--src/lib/ctime/di_ops.c17
1 files changed, 10 insertions, 7 deletions
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;
}