diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-02-05 10:07:34 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-02-18 03:54:50 +0900 |
commit | c004cd2bbed92c9a1ac828fde9f3a523d94ec1eb (patch) | |
tree | 915ca895e3876071a886e185abbe670ebb36155a /src/network/networkd-nexthop.c | |
parent | 56223d926dc6ff75f16a97b2ca62b49589aac2cb (diff) | |
download | systemd-c004cd2bbed92c9a1ac828fde9f3a523d94ec1eb.tar.gz |
network: constify arguments
Diffstat (limited to 'src/network/networkd-nexthop.c')
-rw-r--r-- | src/network/networkd-nexthop.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c index 44a1a9100c..043625557a 100644 --- a/src/network/networkd-nexthop.c +++ b/src/network/networkd-nexthop.c @@ -129,7 +129,7 @@ DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR( nexthop_compare_func, nexthop_free); -static int nexthop_get(Link *link, NextHop *in, NextHop **ret) { +static int nexthop_get(Link *link, const NextHop *in, NextHop **ret) { NextHop *existing; assert(link); @@ -152,7 +152,7 @@ static int nexthop_get(Link *link, NextHop *in, NextHop **ret) { return -ENOENT; } -static int nexthop_add_internal(Link *link, Set **nexthops, NextHop *in, NextHop **ret) { +static int nexthop_add_internal(Link *link, Set **nexthops, const NextHop *in, NextHop **ret) { _cleanup_(nexthop_freep) NextHop *nexthop = NULL; int r; @@ -183,11 +183,11 @@ static int nexthop_add_internal(Link *link, Set **nexthops, NextHop *in, NextHop return 0; } -static int nexthop_add_foreign(Link *link, NextHop *in, NextHop **ret) { +static int nexthop_add_foreign(Link *link, const NextHop *in, NextHop **ret) { return nexthop_add_internal(link, &link->nexthops_foreign, in, ret); } -static int nexthop_add(Link *link, NextHop *in, NextHop **ret) { +static int nexthop_add(Link *link, const NextHop *in, NextHop **ret) { bool is_new = false; NextHop *nexthop; int r; @@ -259,7 +259,7 @@ static int nexthop_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) return 1; } -static int nexthop_configure(NextHop *nexthop, Link *link) { +static int nexthop_configure(const NextHop *nexthop, Link *link) { _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL; int r; @@ -300,7 +300,7 @@ static int nexthop_configure(NextHop *nexthop, Link *link) { link_ref(link); - r = nexthop_add(link, nexthop, &nexthop); + r = nexthop_add(link, nexthop, NULL); if (r < 0) return log_link_error_errno(link, r, "Could not add nexthop: %m"); |