Skip to content
Commit 5b4f3af3 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Steve French
Browse files

smb: smb2pdu.h: Use static_assert() to check struct sizes



Commit 9f9bef9b ("smb: smb2pdu.h: Avoid -Wflex-array-member-not-at-end
warnings") introduced tagged `struct create_context_hdr`. We want to
ensure that when new members need to be added to the flexible structure,
they are always included within this tagged struct.

So, we use `static_assert()` to ensure that the memory layout for
both the flexible structure and the tagged struct is the same after
any changes.

Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 836bb326
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment