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/container/smartlist.h | |
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/container/smartlist.h')
-rw-r--r-- | src/lib/container/smartlist.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/container/smartlist.h b/src/lib/container/smartlist.h index 53a4948cf6..dd455390eb 100644 --- a/src/lib/container/smartlist.h +++ b/src/lib/container/smartlist.h @@ -7,8 +7,10 @@ #define TOR_SMARTLIST_H #include <stddef.h> +#include <stdarg.h> + #include "lib/cc/compat_compiler.h" -#include "common/util_bug.h" +#include "lib/cc/torint.h" #include "lib/testsupport/testsupport.h" /** A resizeable list of pointers, with associated helpful functionality. @@ -66,22 +68,22 @@ void smartlist_subtract(smartlist_t *sl1, const smartlist_t *sl2); */ static inline int smartlist_len(const smartlist_t *sl); static inline int smartlist_len(const smartlist_t *sl) { - tor_assert(sl); + raw_assert(sl); return (sl)->num_used; } /** Return the <b>idx</b>th element of sl. */ static inline void *smartlist_get(const smartlist_t *sl, int idx); static inline void *smartlist_get(const smartlist_t *sl, int idx) { - tor_assert(sl); - tor_assert(idx>=0); - tor_assert(sl->num_used > idx); + raw_assert(sl); + raw_assert(idx>=0); + raw_assert(sl->num_used > idx); return sl->list[idx]; } static inline void smartlist_set(smartlist_t *sl, int idx, void *val) { - tor_assert(sl); - tor_assert(idx>=0); - tor_assert(sl->num_used > idx); + raw_assert(sl); + raw_assert(idx>=0); + raw_assert(sl->num_used > idx); sl->list[idx] = val; } #else /* !(defined(DEBUG_SMARTLIST)) */ |