From ad43e4539ab0eb3d40619f4b426ac1e1bd36b1d3 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 15 Oct 2026 12:07:40 +0200 Subject: 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 Signed-off-by: Stefano Brivio --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.c b/tcp.c index e279f8a..95f4f3e 100644 --- a/tcp.c +++ b/tcp.c @@ -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); -- cgit v1.2.3