On Thu, 15 Oct 2026 12:07:39 +0200
Laurent Vivier
Two fixes for issues detected by cppcheck 2.22.0.
The first is a real simplification: a !partial_send guard in tcp_data_from_tap() is always true when reached, because partial_send causes an early return above it, so the condition is dropped.
The second is a false positive: cppcheck flags buf[n - 1] as a potential negative index in passt-repair.c, not tracking that n < 0 and n < sizeof(*ev) are both handled before that point. The warning is suppressed with an annotation.
Signed-off-by: Laurent Vivier
Laurent Vivier (2): tcp: Drop always-true !partial_send condition in tcp_data_from_tap() passt-repair: Suppress false positive cppcheck negativeIndex warning
Applied. I added an "unmatchedSuppression" tag to the suppression in 2/2, for compatibility with older versions of Cppcheck. -- Stefano