[nft PATCH 0/4] libnftables: minor cleanups initalizing nf_sock instance of nft_ctx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux