1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00

networkd: make network_config_section_free() inline

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-02-16 14:14:41 +01:00
parent 1f38830153
commit 5d160a2304
2 changed files with 5 additions and 6 deletions

View 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;

View 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);