From fe1c735026b08e6985dc267a7487cc58998cbaf5 Mon Sep 17 00:00:00 2001 From: Robby Zambito Date: Sat, 26 Apr 2025 10:39:07 -0400 Subject: Add C to Zig converter Further simplify struct --- include/zaprus.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/zaprus.h b/include/zaprus.h index 51ac70c..f170c38 100644 --- a/include/zaprus.h +++ b/include/zaprus.h @@ -23,20 +23,15 @@ struct SaprusMessage { uint16_t payload_len; union { struct { - struct { - char dest[4]; - }; + char dest[4]; } relay; struct { - struct { - uint16_t src_port; - uint16_t dest_port; - uint32_t seq_num; - uint32_t msg_id; - char _reserved; - char options; - }; - + uint16_t src_port; + uint16_t dest_port; + uint32_t seq_num; + uint32_t msg_id; + char _reserved; + char options; } connection; } headers; char *payload; -- cgit