exportfs: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
PATCH 1/1 exportfs: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length array declaration in struct fid with the new DECLARE_FLEX_ARRAY() helper macro.
This helper allows for a flexible-array member in a union.
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- include/linux/exportfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/exportfs.h +1 -1
@@ -131,7 +131,7 @@ struct fid {u32 parent_block;u32 parent_generation; } udf; -__u32 raw[0 ]; +DECLARE_FLEX_ARRAY (__u32, raw); }; };
Signature · 1 line
2.34.1
Quoted 5 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length array declaration in struct fid with the new
DECLARE_FLEX_ARRAY()helper macro.
Quoted 7 lines
This helper allows for a flexible-array member in a union.
Reviewed-by Kees Cook <[email protected]>
Signature · 1 line
Kees Cook