diff options
author | Anton Kling <anton@kling.gg> | 2024-06-28 17:56:53 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-06-28 17:57:45 +0200 |
commit | b747eb399c556858e05de51b1bb3e875c834c8e0 (patch) | |
tree | b8893bea96e8a01f9053a24d5558188cd1c2ea2e /include | |
parent | 0bab28c0bd18274a9aff69ce0249ae9b8009dfa4 (diff) |
Bug fix: Fix undefined behavior of ipv4_t type.
Turns out unions that include arrays and a integer can have UB due to
endianess not being the same across systems.
Diffstat (limited to 'include')
-rw-r--r-- | include/typedefs.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/typedefs.h b/include/typedefs.h index c10482c..e221978 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -13,7 +13,6 @@ typedef int32_t i32; typedef int64_t i64; typedef union { - u8 a[4]; u32 d; } ipv4_t; |