From: Yu Watanabe Date: Fri, 1 Mar 2019 04:19:53 +0000 (+0900) Subject: network: make all xxx_new_static() static X-Git-Tag: v242-rc1~150^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9560e5b3235e30eea2873e507d27ed00331d838c;p=thirdparty%2Fsystemd.git network: make all xxx_new_static() static These functions are called from only config parsers, and the parsers are in the same files. So, let's make them static. --- diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 7712fd6ae3d..06b6b3d20d9 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -39,7 +39,7 @@ int address_new(Address **ret) { return 0; } -int address_new_static(Network *network, const char *filename, unsigned section_line, Address **ret) { +static int address_new_static(Network *network, const char *filename, unsigned section_line, Address **ret) { _cleanup_(network_config_section_freep) NetworkConfigSection *n = NULL; _cleanup_(address_freep) Address *address = NULL; int r; diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h index 4714c07d4da..57d82f82c39 100644 --- a/src/network/networkd-address.h +++ b/src/network/networkd-address.h @@ -46,7 +46,6 @@ struct Address { LIST_FIELDS(Address, addresses); }; -int address_new_static(Network *network, const char *filename, unsigned section, Address **ret); int address_new(Address **ret); void address_free(Address *address); int address_add_foreign(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret); diff --git a/src/network/networkd-fdb.c b/src/network/networkd-fdb.c index 324f6a5a1aa..02724938ae8 100644 --- a/src/network/networkd-fdb.c +++ b/src/network/networkd-fdb.c @@ -18,7 +18,7 @@ #define STATIC_FDB_ENTRIES_PER_NETWORK_MAX 1024U /* create a new FDB entry or get an existing one. */ -int fdb_entry_new_static( +static int fdb_entry_new_static( Network *network, const char *filename, unsigned section_line, diff --git a/src/network/networkd-fdb.h b/src/network/networkd-fdb.h index 55fc3a21703..c0ef27d7d7c 100644 --- a/src/network/networkd-fdb.h +++ b/src/network/networkd-fdb.h @@ -24,7 +24,6 @@ struct FdbEntry { LIST_FIELDS(FdbEntry, static_fdb_entries); }; -int fdb_entry_new_static(Network *network, const char *filename, unsigned section_line, FdbEntry **ret); void fdb_entry_free(FdbEntry *fdb_entry); int fdb_entry_configure(Link *link, FdbEntry *fdb_entry); diff --git a/src/network/networkd-ipv6-proxy-ndp.c b/src/network/networkd-ipv6-proxy-ndp.c index 98d42055478..e2d77e9ad2c 100644 --- a/src/network/networkd-ipv6-proxy-ndp.c +++ b/src/network/networkd-ipv6-proxy-ndp.c @@ -50,7 +50,7 @@ static int ipv6_proxy_ndp_set(Link *link) { return 0; } -int ipv6_proxy_ndp_address_new_static(Network *network, IPv6ProxyNDPAddress **ret) { +static int ipv6_proxy_ndp_address_new_static(Network *network, IPv6ProxyNDPAddress **ret) { _cleanup_(ipv6_proxy_ndp_address_freep) IPv6ProxyNDPAddress *ipv6_proxy_ndp_address = NULL; assert(network); diff --git a/src/network/networkd-ipv6-proxy-ndp.h b/src/network/networkd-ipv6-proxy-ndp.h index 546e8561f1c..4ce5de8d69c 100644 --- a/src/network/networkd-ipv6-proxy-ndp.h +++ b/src/network/networkd-ipv6-proxy-ndp.h @@ -16,7 +16,6 @@ struct IPv6ProxyNDPAddress { LIST_FIELDS(IPv6ProxyNDPAddress, ipv6_proxy_ndp_addresses); }; -int ipv6_proxy_ndp_address_new_static(Network *network, IPv6ProxyNDPAddress ** ipv6_proxy_ndp_address); void ipv6_proxy_ndp_address_free(IPv6ProxyNDPAddress *ipv6_proxy_ndp_address); int ipv6_proxy_ndp_address_configure(Link *link, IPv6ProxyNDPAddress *ipv6_proxy_ndp_address); int ipv6_proxy_ndp_addresses_configure(Link *link); diff --git a/src/network/networkd-radv.c b/src/network/networkd-radv.c index ecf984e226b..3de969764eb 100644 --- a/src/network/networkd-radv.c +++ b/src/network/networkd-radv.c @@ -124,8 +124,8 @@ int prefix_new(Prefix **ret) { return 0; } -int prefix_new_static(Network *network, const char *filename, - unsigned section_line, Prefix **ret) { +static int prefix_new_static(Network *network, const char *filename, + unsigned section_line, Prefix **ret) { _cleanup_(network_config_section_freep) NetworkConfigSection *n = NULL; _cleanup_(prefix_freep) Prefix *prefix = NULL; int r; diff --git a/src/network/networkd-radv.h b/src/network/networkd-radv.h index bb88f8a4074..ebf6d7299b0 100644 --- a/src/network/networkd-radv.h +++ b/src/network/networkd-radv.h @@ -22,7 +22,6 @@ struct Prefix { int prefix_new(Prefix **ret); void prefix_free(Prefix *prefix); -int prefix_new_static(Network *network, const char *filename, unsigned section, Prefix **ret); DEFINE_TRIVIAL_CLEANUP_FUNC(Prefix*, prefix_free); diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 2e3ea127994..3eb807c9f83 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -67,7 +67,7 @@ int route_new(Route **ret) { return 0; } -int route_new_static(Network *network, const char *filename, unsigned section_line, Route **ret) { +static int route_new_static(Network *network, const char *filename, unsigned section_line, Route **ret) { _cleanup_(network_config_section_freep) NetworkConfigSection *n = NULL; _cleanup_(route_freep) Route *route = NULL; int r; diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h index 9c6c4b8b0d5..c19b7aa3a73 100644 --- a/src/network/networkd-route.h +++ b/src/network/networkd-route.h @@ -43,7 +43,6 @@ struct Route { LIST_FIELDS(Route, routes); }; -int route_new_static(Network *network, const char *filename, unsigned section_line, Route **ret); int route_new(Route **ret); void route_free(Route *route); int route_configure(Route *route, Link *link, link_netlink_message_handler_t callback);