summaryrefslogtreecommitdiffstats
path: root/src/conntrack.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-12-20 16:26:14 +0100
committerPhil Sutter <phil@nwl.cc>2022-12-21 17:50:31 +0100
commit990a7d902f574d3ce5067444fa5cbe76b793b8e2 (patch)
treec5c36ebbd66fe06642e15ae48835f4fd402ed2ca /src/conntrack.c
parent3514a72f5a03ee7c6c268c31446b7a6994d4569d (diff)
conntrack: Fix for unused assignment in do_command_ct()
The variable is overwritten immediately in the next iteration and the loop can't exit before doing that. Instead of dropping the assignment, one could add a return code check - but since event_cb() never fails, that check is pointless as well. Fixes: e0dac21ed02e3 ("conntrack: use libmnl for conntrack events") Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/conntrack.c')
-rw-r--r--src/conntrack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conntrack.c b/src/conntrack.c
index aa6323d..07fae3d 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -3479,7 +3479,7 @@ static int do_command_ct(const char *progname, struct ct_cmd *cmd,
strerror(errno));
break;
}
- res = mnl_cb_run(buf, res, 0, 0, event_cb, cmd);
+ mnl_cb_run(buf, res, 0, 0, event_cb, cmd);
}
mnl_socket_close(event_sock->mnl);
break;