diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2025-02-18 13:07:17 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-02-18 08:43:04 +0100 |
commit | 0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9 (patch) | |
tree | 6bfcc3c9b1ae10119b3e7edd8af499ee7b9844b6 | |
parent | bcc4908c2b4a20c581f2b03fed40da97b804106f (diff) | |
download | passt-0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9.tar passt-0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9.tar.gz passt-0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9.tar.bz2 passt-0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9.tar.lz passt-0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9.tar.xz passt-0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9.tar.zst passt-0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9.zip |
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>
-rw-r--r-- | packet.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, |