Commit f9865f5
committed
smb: smb2pdu.h: Use static_assert() to check struct sizes
JIRA: https://issues.redhat.com/browse/RHEL-57983
commit 5b4f3af
Author: Gustavo A. R. Silva <gustavoars@kernel.org>
Date: Thu Aug 8 16:04:04 2024 -0600
smb: smb2pdu.h: Use static_assert() to check struct sizes
Commit 9f9bef9 ("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: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Paulo Alcantara <paalcant@redhat.com>1 parent 59bd52e commit f9865f5
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1178 | 1178 | | |
1179 | 1179 | | |
1180 | 1180 | | |
| 1181 | + | |
| 1182 | + | |
1181 | 1183 | | |
1182 | 1184 | | |
1183 | 1185 | | |
| |||
0 commit comments