mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 23:21:38 +01:00
Return the actual number of hops in cpath_get_n_hops()
Bug not in any version of tor. Found with clang's scan-build.
This commit is contained in:
parent
a4847ffa91
commit
db00f24d8b
1 changed files with 3 additions and 3 deletions
|
@ -2422,10 +2422,10 @@ cpath_get_n_hops(crypt_path_t **head_ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = *head_ptr;
|
tmp = *head_ptr;
|
||||||
if (tmp) {
|
do {
|
||||||
n_hops++;
|
n_hops++;
|
||||||
tmp = (*head_ptr)->next;
|
tmp = tmp->next;
|
||||||
}
|
} while (tmp != *head_ptr);
|
||||||
|
|
||||||
return n_hops;
|
return n_hops;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue