mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-03-28 15:40:03 +00:00
Replace most usages of CN_PACKET_BUFFER_SIZE with usable body size
This commit is contained in:
@@ -29,8 +29,8 @@
|
||||
#define INITSTRUCT(T, x) T x; \
|
||||
memset(&x, 0, sizeof(T));
|
||||
|
||||
#define INITVARPACKET(_buf, _Pkt, _pkt, _Trailer, _trailer) uint8_t _buf[CN_PACKET_BUFFER_SIZE]; \
|
||||
memset(&_buf, 0, CN_PACKET_BUFFER_SIZE); \
|
||||
#define INITVARPACKET(_buf, _Pkt, _pkt, _Trailer, _trailer) uint8_t _buf[CN_PACKET_BODY_SIZE]; \
|
||||
memset(&_buf, 0, CN_PACKET_BODY_SIZE); \
|
||||
auto _pkt = (_Pkt*)_buf; \
|
||||
auto _trailer = (_Trailer*)(_pkt + 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user