summaryrefslogtreecommitdiff
path: root/toxcore/DHT.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r--toxcore/DHT.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index b2f2e625..682b962f 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -574,7 +574,9 @@ int pack_nodes(uint8_t *data, uint16_t length, const Node_format *nodes, uint16_
574 memcpy(data + packed_length, nodes[i].public_key, CRYPTO_PUBLIC_KEY_SIZE); 574 memcpy(data + packed_length, nodes[i].public_key, CRYPTO_PUBLIC_KEY_SIZE);
575 packed_length += CRYPTO_PUBLIC_KEY_SIZE; 575 packed_length += CRYPTO_PUBLIC_KEY_SIZE;
576 576
577#ifndef NDEBUG
577 const uint32_t increment = ipp_size + CRYPTO_PUBLIC_KEY_SIZE; 578 const uint32_t increment = ipp_size + CRYPTO_PUBLIC_KEY_SIZE;
579#endif
578 assert(increment == PACKED_NODE_SIZE_IP4 || increment == PACKED_NODE_SIZE_IP6); 580 assert(increment == PACKED_NODE_SIZE_IP4 || increment == PACKED_NODE_SIZE_IP6);
579 } 581 }
580 582
@@ -610,7 +612,9 @@ int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed
610 len_processed += CRYPTO_PUBLIC_KEY_SIZE; 612 len_processed += CRYPTO_PUBLIC_KEY_SIZE;
611 ++num; 613 ++num;
612 614
615#ifndef NDEBUG
613 const uint32_t increment = ipp_size + CRYPTO_PUBLIC_KEY_SIZE; 616 const uint32_t increment = ipp_size + CRYPTO_PUBLIC_KEY_SIZE;
617#endif
614 assert(increment == PACKED_NODE_SIZE_IP4 || increment == PACKED_NODE_SIZE_IP6); 618 assert(increment == PACKED_NODE_SIZE_IP4 || increment == PACKED_NODE_SIZE_IP6);
615 } 619 }
616 620