* are only a few reachable nodes, and many unreachable ones, we're
* going to try harder to connect to them. */
- int r = rand() % node_tree->count;
+ unsigned int r = rand() % node_tree->count;
for splay_each(node_t, n, node_tree) {
if(r--) {
drop_superfluous_outgoing_connection();
}
+ /* Drop pending outgoing connections from the outgoing list. */
+ drop_superfluous_pending_connections();
/* Check if there are unreachable nodes that we should try to connect to. */
connect_to_unreachable();
-
- /* Drop pending outgoing connections from the outgoing list. */
- drop_superfluous_pending_connections();
}