]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: cleanup networkd-address-label.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 29 Sep 2020 16:40:03 +0000 (01:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 6 Oct 2020 17:44:42 +0000 (02:44 +0900)
src/network/networkd-address-label.c
src/network/networkd-address-label.h
src/network/networkd-link.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h

index b48e997782afd5ab908775f7dd6b29b2ab18aa59..e83665bfda8aae43f481a7a4a5f189b6839c2467 100644 (file)
@@ -4,12 +4,12 @@
 #include <linux/if_addrlabel.h>
 
 #include "alloc-util.h"
-#include "conf-parser.h"
-#include "networkd-address-label.h"
 #include "netlink-util.h"
+#include "networkd-address-label.h"
+#include "networkd-link.h"
 #include "networkd-manager.h"
+#include "networkd-network.h"
 #include "parse-util.h"
-#include "socket-util.h"
 
 AddressLabel *address_label_free(AddressLabel *label) {
         if (!label)
@@ -24,6 +24,8 @@ AddressLabel *address_label_free(AddressLabel *label) {
         return mfree(label);
 }
 
+DEFINE_NETWORK_SECTION_FUNCTIONS(AddressLabel, address_label_free);
+
 static int address_label_new_static(Network *network, const char *filename, unsigned section_line, AddressLabel **ret) {
         _cleanup_(network_config_section_freep) NetworkConfigSection *n = NULL;
         _cleanup_(address_label_freep) AddressLabel *label = NULL;
index dde6877eefb76de16a1d678e8f353b1dd2d0bdfb..aacab867e7a26b61e4f3284592431e1c8f17ceea 100644 (file)
@@ -2,35 +2,25 @@
 #pragma once
 
 #include <inttypes.h>
-#include <stdbool.h>
 
 #include "conf-parser.h"
 #include "in-addr-util.h"
-
-typedef struct AddressLabel AddressLabel;
-
-#include "networkd-link.h"
-#include "networkd-network.h"
 #include "networkd-util.h"
 
 typedef struct Network Network;
 typedef struct Link Link;
-typedef struct NetworkConfigSection NetworkConfigSection;
 
-struct AddressLabel {
+typedef struct AddressLabel {
         Network *network;
         NetworkConfigSection *section;
 
         unsigned char prefixlen;
         uint32_t label;
-
         union in_addr_union in_addr;
-};
+} AddressLabel;
 
 AddressLabel *address_label_free(AddressLabel *label);
 
-DEFINE_NETWORK_SECTION_FUNCTIONS(AddressLabel, address_label_free);
-
 void network_verify_address_labels(Network *network);
 
 int link_set_address_labels(Link *link);
index fd339e289a104fbeb0d4a545b431306a63dac876..b94e4945f318bd8ea9ce20019b282b2b61b2c340 100644 (file)
@@ -20,6 +20,7 @@
 #include "missing_network.h"
 #include "netlink-util.h"
 #include "network-internal.h"
+#include "networkd-address-label.h"
 #include "networkd-can.h"
 #include "networkd-dhcp-server.h"
 #include "networkd-dhcp4.h"
index 444b6fce9c9d79fa8100f1b158df1e991b7d4815..648e882a292941f226d65a6939630d166265390c 100644 (file)
@@ -6,6 +6,7 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
 #include "conf-parser.h"
 #include "netem.h"
 #include "network-internal.h"
+#include "networkd-address-label.h"
 #include "networkd-can.h"
 #include "networkd-conf.h"
 #include "networkd-dhcp-common.h"
index d5b60e8260398433c7722463af87ffdfb3057880..95f3f653945d17b361eb5c08eb71dc2215b699bb 100644 (file)
@@ -14,6 +14,7 @@
 #include "in-addr-util.h"
 #include "networkd-dhcp-server.h"
 #include "network-internal.h"
+#include "networkd-address-label.h"
 #include "networkd-manager.h"
 #include "networkd-neighbor.h"
 #include "networkd-network.h"
index 4f05b92b3e9a90805e13a714274f67b7d5ad81c2..c129338569fd2821ecb67c37d6fa27a89a957ffc 100644 (file)
@@ -12,7 +12,6 @@
 #include "conf-parser.h"
 #include "hashmap.h"
 #include "netdev.h"
-#include "networkd-address-label.h"
 #include "networkd-address.h"
 #include "networkd-brvlan.h"
 #include "networkd-dhcp-common.h"