From 1b25d18019260527f1e2fa259aa9bb51ad1a1ef0 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 10 Jul 2023 10:45:17 +0200 Subject: libnftables: drop unused argument nf_sock from nft_netlink() Signed-off-by: Thomas Haller Signed-off-by: Pablo Neira Ayuso --- src/libnftables.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libnftables.c') diff --git a/src/libnftables.c b/src/libnftables.c index 57e0fc77..5b3eb2dc 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -17,8 +17,7 @@ #include static int nft_netlink(struct nft_ctx *nft, - struct list_head *cmds, struct list_head *msgs, - struct mnl_socket *nf_sock) + struct list_head *cmds, struct list_head *msgs) { uint32_t batch_seqnum, seqnum = 0, last_seqnum = UINT32_MAX, num_cmds = 0; struct netlink_ctx ctx = { @@ -595,7 +594,7 @@ int nft_run_cmd_from_buffer(struct nft_ctx *nft, const char *buf) goto err; } - if (nft_netlink(nft, &cmds, &msgs, nft->nf_sock) != 0) + if (nft_netlink(nft, &cmds, &msgs) != 0) rc = -1; err: erec_print_list(&nft->output, &msgs, nft->debug_mask); @@ -691,7 +690,7 @@ static int __nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename goto err; } - if (nft_netlink(nft, &cmds, &msgs, nft->nf_sock) != 0) + if (nft_netlink(nft, &cmds, &msgs) != 0) rc = -1; err: erec_print_list(&nft->output, &msgs, nft->debug_mask); -- cgit v1.2.3