All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 04/14] examples: Update netconfig method calls
@ 2022-06-15 22:47 Andrew Zaborowski
  0 siblings, 0 replies; only message in thread
From: Andrew Zaborowski @ 2022-06-15 22:47 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

---
 examples/netconfig-test.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/examples/netconfig-test.c b/examples/netconfig-test.c
index aba63f9..39b6fa4 100644
--- a/examples/netconfig-test.c
+++ b/examples/netconfig-test.c
@@ -40,7 +40,6 @@
 #include <ell/ell.h>
 
 static bool apply;
-static struct l_netlink *rtnl;
 
 static void do_debug(const char *str, void *user_data)
 {
@@ -138,7 +137,7 @@ static void event_handler(struct l_netconfig *netconfig, uint8_t family,
 	log_routes(af_str, "removed", removed);
 
 	if (apply)
-		l_netconfig_apply_rtnl(netconfig, rtnl);
+		l_netconfig_apply_rtnl(netconfig);
 }
 
 static const struct option main_options[] = {
@@ -180,14 +179,6 @@ int main(int argc, char *argv[])
 	if (!l_main_init())
 		return EXIT_FAILURE;
 
-	if (apply) {
-		rtnl = l_netlink_new(NETLINK_ROUTE);
-		if (!rtnl) {
-			fprintf(stderr, "l_netlink_new(NETLINK_ROUTE) error\n");
-			return EXIT_FAILURE;
-		}
-	}
-
 	l_log_set_stderr();
 	l_debug_enable("*");
 
@@ -202,7 +193,5 @@ int main(int argc, char *argv[])
 	l_netconfig_destroy(netconfig);
 	l_main_exit();
 
-	l_netlink_destroy(rtnl);
-
 	return EXIT_SUCCESS;
 }
-- 
2.34.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-15 22:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 22:47 [PATCH 04/14] examples: Update netconfig method calls Andrew Zaborowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.