diff options
author | Zhenlei Huang <zlei@FreeBSD.org> | 2025-07-15 15:31:19 +0000 |
---|---|---|
committer | Zhenlei Huang <zlei@FreeBSD.org> | 2025-07-15 15:31:19 +0000 |
commit | db8296ff38cd149a21ce363341d401afebd75a0f (patch) | |
tree | 60b0e281666657ce49235b49ac0b6061cf6d16f3 /test/Unit/(developers-only) | |
parent | 5c76e9f4579677482b0f96d4b3581f5e1ea2e072 (diff) |
There're lots of consumers, Ethernet drivers, libraries and applications.
It is more promising to assert the sizes in every compilation units
rather than in if_ethersubr.c only.
Those assertions were in the header file but were moved to if_ethersubr.c
due to possible conflict of the implementation of CTASSERT [1]. Now that
the default C standard is now gnu17 [2] [3] which supports _Static_assert
natively, use _Static_assert instead of CTASSERT to avoid possible
conflicts.
While here, add an extra assertion for the size of struct ether_vlan_header.
[1] d54d93ac7f0f Move CTASSERT of ether header sizes out of the header file and into ...
[2] ca4eddea97c5 src: Use gnu17 as the default C standard for userland instead of gnu99
[3] 3a98d5701c7f sys: Use gnu17 as the default C standard for the kernel
PR: 287761 (exp-run)
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D50947
Diffstat (limited to 'test/Unit/(developers-only)')
0 files changed, 0 insertions, 0 deletions