tcp: Make pointer const in tcp_revert_seq
The th pointer could be const, which causes a cppcheck warning on at least
some cppcheck versions (e.g. Cppcheck 2.13.0 in Fedora 40).
Fixes: e84a01e94c
("tcp: move seq_to_tap update to when frame is queued")
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
b3aeb004ea
commit
d2afb4b625
1 changed files with 1 additions and 1 deletions
2
tcp.c
2
tcp.c
|
@ -1261,8 +1261,8 @@ static void tcp_revert_seq(struct tcp_tap_conn **conns, struct iovec (*frames)[T
|
|||
int i;
|
||||
|
||||
for (i = 0; i < num_frames; i++) {
|
||||
const struct tcphdr *th = frames[i][TCP_IOV_PAYLOAD].iov_base;
|
||||
struct tcp_tap_conn *conn = conns[i];
|
||||
struct tcphdr *th = frames[i][TCP_IOV_PAYLOAD].iov_base;
|
||||
uint32_t seq = ntohl(th->seq);
|
||||
|
||||
if (SEQ_LE(conn->seq_to_tap, seq))
|
||||
|
|
Loading…
Reference in a new issue