]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: define Address earlier
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Sep 2021 07:11:36 +0000 (16:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 11 Sep 2021 01:49:11 +0000 (10:49 +0900)
As the type is used in defining address_ready_callback_t.

src/network/networkd-address.h

index 811940c12611f622091585adced0c77f3be78acb..6b5f7ba9c494ad63dbe18dfb6d36051d533e7da2 100644 (file)
 
 #define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU
 
+typedef struct Address Address;
 typedef struct Manager Manager;
 typedef struct Network Network;
 typedef struct Request Request;
 typedef int (*address_ready_callback_t)(Address *address);
 
-typedef struct Address {
+struct Address {
         Network *network;
         NetworkConfigSection *section;
 
@@ -48,7 +49,7 @@ typedef struct Address {
 
         /* Called when address become ready */
         address_ready_callback_t callback;
-} Address;
+};
 
 const char* format_lifetime(char *buf, size_t l, uint32_t lifetime) _warn_unused_result_;
 /* Note: the lifetime of the compound literal is the immediately surrounding block,