diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2026-10-15 12:07:40 +0200 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-10-25 14:04:25 +0100 |
| commit | ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3 (patch) | |
| tree | b55c516118332e3d698d0df2fb2bc720e83bccd5 | |
| parent | 8ba41320c3a256a3bb71b6bca641237168b5b303 (diff) | |
| download | passt-ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3.tar passt-ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3.tar.gz passt-ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3.tar.bz2 passt-ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3.tar.lz passt-ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3.tar.xz passt-ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3.tar.zst passt-ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3.zip | |
tcp: Drop always-true !partial_send condition in tcp_data_from_tap()
When partial_send is true, the code returns early at the "keep != -1 ||
partial_send" check before reaching the fin handling block. Therefore
the !partial_send guard on the fin handling is always true when reached
and can be removed.
Detected with cppcheck 2.22.0
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2160,7 +2160,7 @@ out: conn->seq_ack_from_tap == conn->seq_to_tap) conn_event(c, conn, TAP_FIN_ACKED, now); - if (fin && !partial_send) { + if (fin) { conn->seq_from_tap++; conn_event(c, conn, TAP_FIN_RCVD, now); |
