* [PATCH] tcp: When a connection flag it set, don't negate it for debug print
@ 2023-03-21 18:44 Stefano Brivio
0 siblings, 0 replies; only message in thread
From: Stefano Brivio @ 2023-03-21 18:44 UTC (permalink / raw)
To: passt-dev
Fix a copy and paste typo I added in commit 5474bc5485d8 ("tcp,
tcp_splice: Get rid of false positive CWE-394 Coverity warning from
fls()") and --debug altogether.
Fixes: 5474bc5485d8 ("tcp, tcp_splice: Get rid of false positive CWE-394 Coverity warning from fls()")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcp.c b/tcp.c
index c9c76d7..590b08a 100644
--- a/tcp.c
+++ b/tcp.c
@@ -758,7 +758,7 @@ static void conn_flag_do(const struct ctx *c, struct tcp_tap_conn *conn,
tcp_flag_str[flag_index]);
}
} else {
- int flag_index = fls(~flag);
+ int flag_index = fls(flag);
if (conn->flags & flag) {
/* Special case: setting ACK_FROM_TAP_DUE on a
--
@@ -758,7 +758,7 @@ static void conn_flag_do(const struct ctx *c, struct tcp_tap_conn *conn,
tcp_flag_str[flag_index]);
}
} else {
- int flag_index = fls(~flag);
+ int flag_index = fls(flag);
if (conn->flags & flag) {
/* Special case: setting ACK_FROM_TAP_DUE on a
--
2.39.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-21 18:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 18:44 [PATCH] tcp: When a connection flag it set, don't negate it for debug print Stefano Brivio
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).