summaryrefslogtreecommitdiff
path: root/src/or/status.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-08-15 16:32:32 -0400
committerNick Mathewson <nickm@torproject.org>2014-08-15 16:32:32 -0400
commit664b2645fbb952208a13d213bc237af868109a00 (patch)
tree8a5b77e26c3dc516abbabaa6c8b94905fc7eaf5c /src/or/status.c
parent6969bd9a02895ae7dc80264fb59adba4a44f79a1 (diff)
downloadtor-664b2645fbb952208a13d213bc237af868109a00.tar.gz
tor-664b2645fbb952208a13d213bc237af868109a00.zip
Hand-fix a few global_circuit_list cases
Diffstat (limited to 'src/or/status.c')
-rw-r--r--src/or/status.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/or/status.c b/src/or/status.c
index b7f7d1b778..c4156d0cc3 100644
--- a/src/or/status.c
+++ b/src/or/status.c
@@ -28,13 +28,7 @@ static void log_accounting(const time_t now, const or_options_t *options);
STATIC int
count_circuits(void)
{
- int nr=0;
-
- SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, circ)
- nr++;
- SMARTLIST_FOREACH_END(circ);
-
- return nr;
+ return smartlist_len(circuit_get_global_list());
}
/** Take seconds <b>secs</b> and return a newly allocated human-readable