summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-03-01 13:19:53 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-03-13 11:59:18 +0900
commit9560e5b3235e30eea2873e507d27ed00331d838c (patch)
treea7becc54b3f000e435f99a7d1f64334e270644f2 /src/network
parentfa7cd7117ff2158c4d175b0321a0c0393cc4e3ec (diff)
downloadsystemd-9560e5b3235e30eea2873e507d27ed00331d838c.tar.gz
systemd-9560e5b3235e30eea2873e507d27ed00331d838c.tar.bz2
systemd-9560e5b3235e30eea2873e507d27ed00331d838c.zip
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.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-address.c2
-rw-r--r--src/network/networkd-address.h1
-rw-r--r--src/network/networkd-fdb.c2
-rw-r--r--src/network/networkd-fdb.h1
-rw-r--r--src/network/networkd-ipv6-proxy-ndp.c2
-rw-r--r--src/network/networkd-ipv6-proxy-ndp.h1
-rw-r--r--src/network/networkd-radv.c4
-rw-r--r--src/network/networkd-radv.h1
-rw-r--r--src/network/networkd-route.c2
-rw-r--r--src/network/networkd-route.h1
10 files changed, 6 insertions, 11 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 7712fd6ae3..06b6b3d20d 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 4714c07d4d..57d82f82c3 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 324f6a5a1a..02724938ae 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 55fc3a2170..c0ef27d7d7 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 98d4205547..e2d77e9ad2 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 546e8561f1..4ce5de8d69 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 ecf984e226..3de969764e 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 bb88f8a407..ebf6d7299b 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 2e3ea12799..3eb807c9f8 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 9c6c4b8b0d..c19b7aa3a7 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);