Skip to content

Commit d01c116

Browse files
zoff99iphydf
authored andcommitted
cleanup: make it more clear that assert and uint32_t increment both only exist if NDEBUG is not defined
1 parent 58fac53 commit d01c116

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

toxcore/DHT.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ int pack_nodes(const Logger *logger, uint8_t *data, uint16_t length, const Node_
533533

534534
#ifndef NDEBUG
535535
const uint32_t increment = ipp_size + CRYPTO_PUBLIC_KEY_SIZE;
536-
#endif
537536
assert(increment == PACKED_NODE_SIZE_IP4 || increment == PACKED_NODE_SIZE_IP6);
537+
#endif
538538
}
539539

540540
return packed_length;
@@ -565,8 +565,8 @@ int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed
565565

566566
#ifndef NDEBUG
567567
const uint32_t increment = ipp_size + CRYPTO_PUBLIC_KEY_SIZE;
568-
#endif
569568
assert(increment == PACKED_NODE_SIZE_IP4 || increment == PACKED_NODE_SIZE_IP6);
569+
#endif
570570
}
571571

572572
if (processed_data_len != nullptr) {

0 commit comments

Comments
 (0)