diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-04-29 00:06:39 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2025-05-01 20:37:35 +0300 |
commit | 7b05f43155cb128aa06a226afdbc3daa8d75b358 (patch) | |
tree | 132eab156ff0bef5fd54e6ef6a4c8c570c69d079 /scripts/bpf_doc.py | |
parent | 358b1c0f56ebb6996fcec7dcdcf6bae5dcbc8b6c (diff) | |
download | linux-7b05f43155cb128aa06a226afdbc3daa8d75b358.tar.xz |
bpf: Replace offsetof() with struct_size()
Compared to offsetof(), struct_size() provides additional compile-time
checks for structs with flexible arrays (e.g., __must_be_array()).
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250428210638.30219-2-thorsten.blum@linux.dev
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions