]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: make all xxx_new_static() static
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Mar 2019 04:19:53 +0000 (13:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Mar 2019 02:59:18 +0000 (11:59 +0900)
These functions are called from only config parsers, and the parsers are
in the same files. So, let's make them static.

src/network/networkd-address.c
src/network/networkd-address.h
src/network/networkd-fdb.c
src/network/networkd-fdb.h
src/network/networkd-ipv6-proxy-ndp.c
src/network/networkd-ipv6-proxy-ndp.h
src/network/networkd-radv.c
src/network/networkd-radv.h
src/network/networkd-route.c
src/network/networkd-route.h

index 7712fd6ae3d97161a655c5759d8ea7ab2a249481..06b6b3d20d94018e7aeee7790536e6a5a653506d 100644 (file)
@@ -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;
index 4714c07d4da56e10afbdf57a718d3721f7403210..57d82f82c3955b6591a71a3740d07ab7b61d575a 100644 (file)
@@ -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);
index 324f6a5a1aad12d24d87f455748d5a35380532d0..02724938ae86ea2a3cf4e303a76270fe808918d2 100644 (file)
@@ -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,
index 55fc3a217030df2ed150d371b0c29db7caf818f3..c0ef27d7d7c6803637582a187ec8bc31a779a7c1 100644 (file)
@@ -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);
 
index 98d420554782a3c56ebb310fc7ae0a447eaab342..e2d77e9ad2c56f24892733d66929004a20caad11 100644 (file)
@@ -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);
index 546e8561f1ce89bed8be9be04a28b56b68e51c75..4ce5de8d69c51a7cb80995ba140bf8ccad209088 100644 (file)
@@ -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);
index ecf984e226b34dcc1488b11b24a0499f6a177333..3de969764ebccb993154e441566c8d8e1d247b7a 100644 (file)
@@ -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;
index bb88f8a4074ca2b5b31edd54332ce65939f1fe4c..ebf6d7299b09533ebac5ff75d109ac8db80a26e5 100644 (file)
@@ -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);
 
index 2e3ea1279948acb3c68dcc9ca404f8c1355f8213..3eb807c9f83b44bae2e5575bee40eb89f440f3bb 100644 (file)
@@ -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;
index 9c6c4b8b0d58029565c537edd5fd2337210cad22..c19b7aa3a73b99ba390536e5054e8f6cc8c7f532 100644 (file)
@@ -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);