diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2025-02-18 13:50:13 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-02-18 11:28:37 +0100 |
| commit | 5a07eb3cccf1abf0a44d6ab01819f8f605c87ef4 (patch) | |
| tree | 1620dd2f1545bae3fe235dacd7d96e596664fa74 /contrib | |
| parent | 6b4065153c67e7578d448927e49f244deea70e4d (diff) | |
| download | passt-5a07eb3cccf1abf0a44d6ab01819f8f605c87ef4.tar passt-5a07eb3cccf1abf0a44d6ab01819f8f605c87ef4.tar.gz passt-5a07eb3cccf1abf0a44d6ab01819f8f605c87ef4.tar.bz2 passt-5a07eb3cccf1abf0a44d6ab01819f8f605c87ef4.tar.lz passt-5a07eb3cccf1abf0a44d6ab01819f8f605c87ef4.tar.xz passt-5a07eb3cccf1abf0a44d6ab01819f8f605c87ef4.tar.zst passt-5a07eb3cccf1abf0a44d6ab01819f8f605c87ef4.zip | |
tcp_vu: head_cnt need not be global
head_cnt is a global variable which tracks how many entries in head[] are
currently used. The fact that it's global obscures the fact that the
lifetime over which it has a meaningful value is quite short: a single
call to of tcp_vu_data_from_sock().
Make it a local to tcp_vu_data_from_sock() to make that lifetime clearer.
We keep the head[] array global for now - although technically it has the
same valid lifetime - because it's large enough we might not want to put
it on the stack.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions
