Skip to content

Commit c87e4ad

Browse files
GustavoARSilvadavem330
authored andcommitted
net: ethernet: rmnet: 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 arrays declarations in anonymous union with the new DECLARE_FLEX_ARRAY() helper macro. This helper allows for flexible-array members in unions. Link: KSPP#193 Link: KSPP#221 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8fff09e commit c87e4ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct rmnet_map_control_command {
1919
__be16 flow_control_seq_num;
2020
__be32 qos_id;
2121
} flow_control;
22-
u8 data[0];
22+
DECLARE_FLEX_ARRAY(u8, data);
2323
};
2424
} __aligned(1);
2525

0 commit comments

Comments
 (0)