mirror of
https://passt.top/passt
synced 2025-06-17 12:45:34 +02: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:
parent
bcc4908c2b
commit
0a51060f7a
1 changed files with 1 additions and 1 deletions
2
packet.h
2
packet.h
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue