There is some unnecessary or redundant code in "src/libnftables.c". Clean up. This was motivated by an attempt to add a new flag for nft_ctx_new(), beside NFT_CTX_DEFAULT. The current "if (flags == NFT_CTX_DEFAULT)" check is an odd usage for flags (because we would want that behavior for all flags). Thomas Haller (4): libnftables: always initialize netlink socket in nft_ctx_new() libnftables: drop unused argument nf_sock from nft_netlink() libnftables: inline creation of nf_sock in nft_ctx_new() libnftables: drop check for nf_sock in nft_ctx_free() src/libnftables.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) -- 2.41.0