Skip to contentSkip to conversation

media: pci: cx18-av-vbi: Replace one-element array with flexible-array member

PATCH In review Gustavo A. R. Silva 2 participants 2 messages May 24, 2023 – May 26, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: pci: cx18-av-vbi: 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 arrays with flexible-array members in struct vbi_anc_data.

This results in no differences in binary output.

---
 drivers/media/pci/cx18/cx18-av-vbi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/cx18/cx18-av-vbi.c +1 -1
index a0d465924e75..65281d40c681 100644
@@ -51,7 +51,7 @@ struct vbi_anc_data {
 	u8 sdid;
 	u8 data_count;
 	u8 idid[2];
-	u8 payload[1]; /* data_count of payload */
+	u8 payload[]; /* data_count of payload */
 	/* u8 checksum; */
 	/* u8 fill[]; Variable number of fill bytes */
 };
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Gustavo A. R. Silva

One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element arrays with flexible-array members in struct vbi_anc_data.

This results in no differences in binary output.

Signature · 1 line
Kees Cook