]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: make network_config_section_free() inline
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 16 Feb 2021 13:14:41 +0000 (14:14 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 16 Feb 2021 13:27:59 +0000 (14:27 +0100)
src/network/networkd-util.c
src/network/networkd-util.h

index b41148d2c69335f78cc1e483d72ac0af94c922cf..a5c6fa8d006129e091ee2d2ffa1d64268020f00d 100644 (file)
@@ -155,10 +155,6 @@ int network_config_section_new(const char *filename, unsigned line, NetworkConfi
         return 0;
 }
 
-void network_config_section_free(NetworkConfigSection *cs) {
-        free(cs);
-}
-
 unsigned hashmap_find_free_section_line(Hashmap *hashmap) {
         NetworkConfigSection *cs;
         unsigned n = 0;
index 0cfb009890d51116374959f81c1c7fcf2e5dca16..efeeb86eb0b192f5f2edf6b7f7cc895effa0187f 100644 (file)
@@ -47,9 +47,12 @@ sd_dhcp_lease_server_type dhcp_lease_server_type_from_string(const char *s) _pur
 
 int kernel_route_expiration_supported(void);
 
-int network_config_section_new(const char *filename, unsigned line, NetworkConfigSection **s);
-void network_config_section_free(NetworkConfigSection *network);
+static inline void network_config_section_free(NetworkConfigSection *cs) {
+        free(cs);
+}
 DEFINE_TRIVIAL_CLEANUP_FUNC(NetworkConfigSection*, network_config_section_free);
+
+int network_config_section_new(const char *filename, unsigned line, NetworkConfigSection **s);
 extern const struct hash_ops network_config_hash_ops;
 unsigned hashmap_find_free_section_line(Hashmap *hashmap);