diff options
author | Denis Kenzior <denkenz@gmail.com> | 2023-04-13 21:31:37 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2023-04-16 11:26:22 -0500 |
commit | 22775c298c092e017ea22844317e3e07ff2207f5 (patch) | |
tree | e8c50d160318cbdabacb0394084be66ec350de11 | |
parent | 89d4888f1321c03810534a3e1cf464fc5fe368f2 (diff) |
treewide: Prefer flexible arrays to zero-length arrays
https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
-rw-r--r-- | ell/cert.c | 2 | ||||
-rw-r--r-- | ell/dhcp-private.h | 2 | ||||
-rw-r--r-- | ell/settings.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -67,7 +67,7 @@ struct l_cert { struct l_cert *issuer; struct l_cert *issued; size_t asn1_len; - uint8_t asn1[0]; + uint8_t asn1[]; }; struct l_certchain { diff --git a/ell/dhcp-private.h b/ell/dhcp-private.h index b695e4ec..1d76488b 100644 --- a/ell/dhcp-private.h +++ b/ell/dhcp-private.h @@ -87,7 +87,7 @@ struct dhcp_message { uint8_t sname[64]; uint8_t file[128]; __be32 magic; - uint8_t options[0]; + uint8_t options[]; } __attribute__ ((packed)); struct dhcp_message_iter { diff --git a/ell/settings.c b/ell/settings.c index ac4259c7..72729de6 100644 --- a/ell/settings.c +++ b/ell/settings.c @@ -61,7 +61,7 @@ struct embedded_group_data { char *name; char type[32]; size_t len; - char data[0]; + char data[]; }; struct group_data { |