diff options
-rw-r--r-- | src/or/circuitbuild.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 279308afcb..e796ea2ed3 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2422,10 +2422,10 @@ cpath_get_n_hops(crypt_path_t **head_ptr) } tmp = *head_ptr; - if (tmp) { + do { n_hops++; - tmp = (*head_ptr)->next; - } + tmp = tmp->next; + } while (tmp != *head_ptr); return n_hops; } |