From 073eba2319b6cf986c73aab9932e095d9549e4d6 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 4 May 2022 16:03:57 +0900 Subject: [PATCH] sd-ndisc: drop unused function (cherry picked from commit 9a44966e633f7821067eafc582d641bd069817be) --- src/libsystemd-network/ndisc-router.c | 21 --------------------- src/systemd/sd-ndisc.h | 1 - 2 files changed, 22 deletions(-) diff --git a/src/libsystemd-network/ndisc-router.c b/src/libsystemd-network/ndisc-router.c index 26615ac666..e4cbf714b9 100644 --- a/src/libsystemd-network/ndisc-router.c +++ b/src/libsystemd-network/ndisc-router.c @@ -34,27 +34,6 @@ sd_ndisc_router *ndisc_router_new(size_t raw_size) { return rt; } -int sd_ndisc_router_from_raw(sd_ndisc_router **ret, const void *raw, size_t raw_size) { - _cleanup_(sd_ndisc_router_unrefp) sd_ndisc_router *rt = NULL; - int r; - - assert_return(ret, -EINVAL); - assert_return(raw || raw_size <= 0, -EINVAL); - - rt = ndisc_router_new(raw_size); - if (!rt) - return -ENOMEM; - - memcpy(NDISC_ROUTER_RAW(rt), raw, raw_size); - r = ndisc_router_parse(NULL, rt); - if (r < 0) - return r; - - *ret = TAKE_PTR(rt); - - return r; -} - int sd_ndisc_router_get_address(sd_ndisc_router *rt, struct in6_addr *ret_addr) { assert_return(rt, -EINVAL); assert_return(ret_addr, -EINVAL); diff --git a/src/systemd/sd-ndisc.h b/src/systemd/sd-ndisc.h index ab9ff55ddb..d39a6ddb31 100644 --- a/src/systemd/sd-ndisc.h +++ b/src/systemd/sd-ndisc.h @@ -82,7 +82,6 @@ int sd_ndisc_set_ifname(sd_ndisc *nd, const char *interface_name); int sd_ndisc_get_ifname(sd_ndisc *nd, const char **ret); int sd_ndisc_set_mac(sd_ndisc *nd, const struct ether_addr *mac_addr); -int sd_ndisc_router_from_raw(sd_ndisc_router **ret, const void *raw, size_t raw_size); sd_ndisc_router *sd_ndisc_router_ref(sd_ndisc_router *rt); sd_ndisc_router *sd_ndisc_router_unref(sd_ndisc_router *rt);