1
0
mirror of https://passt.top/passt synced 2025-02-22 19:02:20 +00:00

packet: Use flexible array member in struct pool

Currently we have a dummy pkt[1] array, which we alias with an array of
a different size via various macros.  However, we already require C11 which
includes flexible array members, so we can do better.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
David Gibson 2025-02-18 13:07:17 +11:00 committed by Stefano Brivio
parent bcc4908c2b
commit 0a51060f7a

View File

@ -21,7 +21,7 @@ struct pool {
size_t buf_size;
size_t size;
size_t count;
struct iovec pkt[1];
struct iovec pkt[];
};
int vu_packet_check_range(void *buf, size_t offset, size_t len,