smb: Replace one-element array with flexible-array member
Subsystems (2)
PATCH 1/1 smb: Replace one-element array with flexible-array member
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct smb_negotiate_req.
This results in no differences in binary output.
--- fs/smb/server/smb_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/server/smb_common.h +1 -1
@@ -200,7 +200,7 @@ struct smb_hdr {struct smb_negotiate_req {struct smb_hdr hdr;/* wct = 0 */ __le16 ByteCount; -unsigned char DialectsArray[1 ]; +unsigned char DialectsArray[]; } __packed;struct smb_negotiate_rsp {
Signature · 1 line
2.34.1
Quoted 9 lines · Gustavo A. R. Silva
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
smb_negotiate_req.This results in no differences in binary output.
Signature · 1 line
Kees Cook
2023-06-22 6:12 GMT+09:00, Gustavo A. R. Silva <[email protected]>:
Quoted 9 lines
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
smb_negotiate_req.This results in no differences in binary output.
Thanks!
Quoted 9 lines · Gustavo A. R. Silva
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
smb_negotiate_req.This results in no differences in binary output.
2023-06-22 6:12 GMT+09:00, Gustavo A. R. Silva <[email protected]>:
Quoted 9 lines
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
smb_negotiate_req.This results in no differences in binary output.
Applied it with reviewed/acked-by tags to #ksmbd-for-next-next.
Thanks.