[PATCH nft 2/3] netlink: remove nfsock_open()

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

 



Just merge this code to netlink_open_sock().

Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/netlink.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/netlink.c b/src/netlink.c
index 90f8486581fe..b6336e836e88 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -48,22 +48,16 @@ const struct location netlink_location = {
 	.indesc	= &indesc_netlink,
 };
 
-static struct mnl_socket *nfsock_open(void)
-{
-	struct mnl_socket *s;
-
-	s = mnl_socket_open(NETLINK_NETFILTER);
-	if (s == NULL)
-		netlink_init_error();
-	return s;
-}
-
 struct mnl_socket *netlink_open_sock(void)
 {
 	struct mnl_socket *nf_sock;
 
-	nf_sock = nfsock_open();
+	nf_sock = mnl_socket_open(NETLINK_NETFILTER);
+	if (nf_sock == NULL)
+		netlink_init_error();
+
 	fcntl(mnl_socket_get_fd(nf_sock), F_SETFL, O_NONBLOCK);
+
 	return nf_sock;
 }
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux