summaryrefslogtreecommitdiff
path: root/toxcore/DHT.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r--toxcore/DHT.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index 01fcfd66..543ee191 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -1704,12 +1704,10 @@ static uint8_t do_ping_and_sendnode_requests(DHT *dht, uint64_t *lastgetnode, co
1704 /* If node is not dead. */ 1704 /* If node is not dead. */
1705 Client_data *client = &list[i]; 1705 Client_data *client = &list[i];
1706 1706
1707 IPPTsPng *const assocs[] = { &client->assoc6, &client->assoc4, nullptr }; 1707 IPPTsPng *const assocs[] = { &client->assoc6, &client->assoc4 };
1708
1709 uint32_t j = 0;
1710 1708
1711 for (IPPTsPng * const *it = assocs; *it; ++it, ++j) { 1709 for (uint32_t j = 0; j < sizeof(assocs) / sizeof(assocs[0]); ++j) {
1712 IPPTsPng *const assoc = *it; 1710 IPPTsPng *const assoc = assocs[j];
1713 1711
1714 if (!is_timeout(assoc->timestamp, KILL_NODE_TIMEOUT)) { 1712 if (!is_timeout(assoc->timestamp, KILL_NODE_TIMEOUT)) {
1715 sort = 0; 1713 sort = 0;