From: Andrew Zaborowski <andrew.zaborowski at intel.com>
To: ell at lists.01.org
Subject: [PATCH 06/15] examples: Update netconfig method calls
Date: Fri, 20 May 2022 17:43:29 +0200 [thread overview]
Message-ID: <20220520154338.2056273-6-andrew.zaborowski@intel.com> (raw)
In-Reply-To: 20220520154338.2056273-1-andrew.zaborowski@intel.com
[-- 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.32.0
reply other threads:[~2022-05-20 15:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220520154338.2056273-6-andrew.zaborowski@intel.com \
--to=ell@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).