cleanup: make it more clear that assert and uint32_t increment both only exist if NDEBUG is not defined

This commit is contained in:
zoff99 2022-04-26 15:56:59 +02:00 committed by iphydf
parent 58fac53429
commit d01c116764
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -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) {