From d01c116764106662345bf748ae19321d2eb9042b Mon Sep 17 00:00:00 2001 From: zoff99 Date: Tue, 26 Apr 2022 15:56:59 +0200 Subject: [PATCH] cleanup: make it more clear that assert and uint32_t increment both only exist if NDEBUG is not defined --- toxcore/DHT.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 75907645..2c10fab4 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c @@ -533,8 +533,8 @@ int pack_nodes(const Logger *logger, uint8_t *data, uint16_t length, const Node_ #ifndef NDEBUG const uint32_t increment = ipp_size + CRYPTO_PUBLIC_KEY_SIZE; -#endif assert(increment == PACKED_NODE_SIZE_IP4 || increment == PACKED_NODE_SIZE_IP6); +#endif } return packed_length; @@ -565,8 +565,8 @@ int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed #ifndef NDEBUG const uint32_t increment = ipp_size + CRYPTO_PUBLIC_KEY_SIZE; -#endif assert(increment == PACKED_NODE_SIZE_IP4 || increment == PACKED_NODE_SIZE_IP6); +#endif } if (processed_data_len != nullptr) {