]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: make several functions static
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 29 Sep 2020 15:05:18 +0000 (00:05 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 6 Oct 2020 17:44:42 +0000 (02:44 +0900)
src/network/networkd-neighbor.c
src/network/networkd-neighbor.h

index abffa39f260361139f30af4a0afa611c16db3c39..a4336005d9d94889b464194ccb3b84acacbbb82c 100644 (file)
@@ -32,6 +32,8 @@ void neighbor_free(Neighbor *neighbor) {
         free(neighbor);
 }
 
+DEFINE_NETWORK_SECTION_FUNCTIONS(Neighbor, neighbor_free);
+
 static int neighbor_new_static(Network *network, const char *filename, unsigned section_line, Neighbor **ret) {
         _cleanup_(network_config_section_freep) NetworkConfigSection *n = NULL;
         _cleanup_(neighbor_freep) Neighbor *neighbor = NULL;
@@ -118,7 +120,7 @@ static int neighbor_compare_func(const Neighbor *a, const Neighbor *b) {
 
 DEFINE_PRIVATE_HASH_OPS_WITH_KEY_DESTRUCTOR(neighbor_hash_ops, Neighbor, neighbor_hash_func, neighbor_compare_func, neighbor_free);
 
-int neighbor_get(Link *link, const Neighbor *in, Neighbor **ret) {
+static int neighbor_get(Link *link, const Neighbor *in, Neighbor **ret) {
         Neighbor *existing;
 
         assert(link);
@@ -202,7 +204,7 @@ int neighbor_add(Link *link, const Neighbor *in, Neighbor **ret) {
         return 0;
 }
 
-int neighbor_add_foreign(Link *link, const Neighbor *in, Neighbor **ret) {
+static int neighbor_add_foreign(Link *link, const Neighbor *in, Neighbor **ret) {
         return neighbor_add_internal(link, &link->neighbors_foreign, in, ret);
 }
 
@@ -242,7 +244,7 @@ static int neighbor_configure_handler(sd_netlink *rtnl, sd_netlink_message *m, L
         return 1;
 }
 
-int neighbor_configure(Neighbor *neighbor, Link *link, link_netlink_message_handler_t callback) {
+static int neighbor_configure(Neighbor *neighbor, Link *link, link_netlink_message_handler_t callback) {
         _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
         int r;
 
index fad4ab23be8b5b00fb6a56e6469a6876d6303380..47a182161d4823a158f33ed11b0f22b119c3685a 100644 (file)
@@ -32,19 +32,13 @@ struct Neighbor {
 };
 
 void neighbor_free(Neighbor *neighbor);
+int neighbor_section_verify(Neighbor *neighbor);
 
-DEFINE_NETWORK_SECTION_FUNCTIONS(Neighbor, neighbor_free);
-
-int neighbor_configure(Neighbor *neighbor, Link *link, link_netlink_message_handler_t callback);
 int neighbor_remove(Neighbor *neighbor, Link *link, link_netlink_message_handler_t callback);
 
-int neighbor_get(Link *link, const Neighbor *in, Neighbor **ret);
 int neighbor_add(Link *link, const Neighbor *in, Neighbor **ret);
-int neighbor_add_foreign(Link *link, const Neighbor *in, Neighbor **ret);
 bool neighbor_equal(const Neighbor *n1, const Neighbor *n2);
 
-int neighbor_section_verify(Neighbor *neighbor);
-
 int link_set_neighbors(Link *link);
 
 int manager_rtnl_process_neighbor(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);