From: Yu Watanabe Date: Mon, 19 Aug 2024 03:36:17 +0000 (+0900) Subject: network/routing-policy-rule: drop unused argument X-Git-Tag: v257-rc1~678^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F34021%2Fhead;p=thirdparty%2Fsystemd.git network/routing-policy-rule: drop unused argument --- diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c index c68a1aa71ac..8e7cc471185 100644 --- a/src/network/networkd-routing-policy-rule.c +++ b/src/network/networkd-routing-policy-rule.c @@ -462,14 +462,12 @@ static void log_routing_policy_rule_debug(const RoutingPolicyRule *rule, const c strna(rule->iif), strna(rule->oif), strna(table)); } -static int routing_policy_rule_set_netlink_message(const RoutingPolicyRule *rule, sd_netlink_message *m, Link *link) { +static int routing_policy_rule_set_netlink_message(const RoutingPolicyRule *rule, sd_netlink_message *m) { int r; assert(rule); assert(m); - /* link may be NULL. */ - if (rule->from_prefixlen > 0) { r = netlink_message_append_in_addr_union(m, FRA_SRC, rule->family, &rule->from); if (r < 0) @@ -616,7 +614,7 @@ static int routing_policy_rule_remove(RoutingPolicyRule *rule) { if (r < 0) return log_warning_errno(r, "Could not allocate netlink message: %m"); - r = routing_policy_rule_set_netlink_message(rule, m, NULL); + r = routing_policy_rule_set_netlink_message(rule, m); if (r < 0) return log_warning_errno(r, "Could not create netlink message: %m"); @@ -648,7 +646,7 @@ static int routing_policy_rule_configure(RoutingPolicyRule *rule, Link *link, Re if (r < 0) return r; - r = routing_policy_rule_set_netlink_message(rule, m, link); + r = routing_policy_rule_set_netlink_message(rule, m); if (r < 0) return r;