summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2007-07-02 19:45:44 +0000
committerPeter Palfrader <peter@palfrader.org>2007-07-02 19:45:44 +0000
commitccefd7404e4c60e735934def22b6a768251b7f61 (patch)
tree3cfbe6fe2950e47cebde5690cf4b13f0c7e64585 /src
parentf274c1413eb575899e48d26f4fcb5d70445f1ffb (diff)
downloadtor-ccefd7404e4c60e735934def22b6a768251b7f61.tar.gz
tor-ccefd7404e4c60e735934def22b6a768251b7f61.zip
Don't get private with smartlists when there's a perfectly fine accessor method for num_used
svn:r10724
Diffstat (limited to 'src')
-rw-r--r--src/or/routerlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index ecb5ee70ff..8678733d1a 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1867,7 +1867,7 @@ routerlist_is_overfull(routerlist_t *rl)
static INLINE int
_routerlist_find_elt(smartlist_t *sl, void *ri, int idx)
{
- tor_assert(idx < sl->num_used);
+ tor_assert(idx < smartlist_len(sl));
if (idx < 0 || smartlist_get(sl, idx) != ri) {
idx = -1;
SMARTLIST_FOREACH(sl, routerinfo_t *, r,
@@ -2422,7 +2422,7 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
router->cache_info.identity_digest);
if (old_router) {
int pos = old_router->routerlist_index;
- tor_assert(0 <= pos && pos < routerlist->routers->num_used);
+ tor_assert(0 <= pos && pos < smartlist_len(routerlist->routers));
tor_assert(smartlist_get(routerlist->routers, pos) == old_router);
if (router->cache_info.published_on <=