static struct mnl_socket *nfsock_open(void)
{
- struct mnl_socket *s = mnl_socket_open(NETLINK_NETFILTER);
+ struct mnl_socket *s;
+
+ s = mnl_socket_open(NETLINK_NETFILTER);
if (s == NULL)
netlink_open_error();
-
return s;
}
static struct nft_table *netlink_table_alloc(const struct nlmsghdr *nlh)
{
- struct nft_table *nlt = nft_table_alloc();
+ struct nft_table *nlt;
+
+ nlt = nft_table_alloc();
if (nlt == NULL)
memory_allocation_error();
-
if (nft_table_nlmsg_parse(nlh, nlt) < 0)
netlink_abi_error();
static struct nft_chain *netlink_chain_alloc(const struct nlmsghdr *nlh)
{
- struct nft_chain *nlc = nft_chain_alloc();
+ struct nft_chain *nlc;
+
+ nlc = nft_chain_alloc();
if (nlc == NULL)
memory_allocation_error();
-
if (nft_chain_nlmsg_parse(nlh, nlc) < 0)
netlink_abi_error();
static struct nft_set *netlink_set_alloc(const struct nlmsghdr *nlh)
{
- struct nft_set *nls = nft_set_alloc();
+ struct nft_set *nls;
+
+ nls = nft_set_alloc();
if (nls == NULL)
memory_allocation_error();
-
if (nft_set_nlmsg_parse(nlh, nls) < 0)
netlink_abi_error();
static struct nft_set *netlink_setelem_alloc(const struct nlmsghdr *nlh)
{
- struct nft_set *nls = nft_set_alloc();
+ struct nft_set *nls;
+
+ nls = nft_set_alloc();
if (nls == NULL)
memory_allocation_error();
-
if (nft_set_elems_nlmsg_parse(nlh, nls) < 0)
netlink_abi_error();
static struct nft_rule *netlink_rule_alloc(const struct nlmsghdr *nlh)
{
- struct nft_rule *nlr = nft_rule_alloc();
+ struct nft_rule *nlr;
+
+ nlr = nft_rule_alloc();
if (nlr == NULL)
memory_allocation_error();
-
if (nft_rule_nlmsg_parse(nlh, nlr) < 0)
netlink_abi_error();