diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-17 12:27:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-08 14:47:19 -0500 |
commit | c92ac9f5cbb4440b5f87c7e0dd6bec5147d72405 (patch) | |
tree | 2cd04944fc6132f5abadddbe6d225801385abcac /src/common/address.h | |
parent | 2f086888b14be3998421b29bfc81d037b8073202 (diff) | |
download | tor-c92ac9f5cbb4440b5f87c7e0dd6bec5147d72405.tar.gz tor-c92ac9f5cbb4440b5f87c7e0dd6bec5147d72405.zip |
Convert the rest of src/common's headers to use FREE_AND_NULL
Diffstat (limited to 'src/common/address.h')
-rw-r--r-- | src/common/address.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/common/address.h b/src/common/address.h index c7f6935754..84d136d671 100644 --- a/src/common/address.h +++ b/src/common/address.h @@ -206,7 +206,9 @@ const char * fmt_addr32(uint32_t addr); MOCK_DECL(int,get_interface_address6,(int severity, sa_family_t family, tor_addr_t *addr)); -void free_interface_address6_list(smartlist_t * addrs); +void interface_address6_list_free_(smartlist_t * addrs);// XXXX +#define interface_address6_list_free(addrs) \ + FREE_AND_NULL(interface_address6_list, (addrs)) MOCK_DECL(smartlist_t *,get_interface_address6_list,(int severity, sa_family_t family, int include_internal)); @@ -321,13 +323,8 @@ int addr_mask_get_bits(uint32_t mask); int tor_inet_ntoa(const struct in_addr *in, char *buf, size_t buf_len); char *tor_dup_ip(uint32_t addr) ATTR_MALLOC; MOCK_DECL(int,get_interface_address,(int severity, uint32_t *addr)); -/** Free a smartlist of IP addresses returned by get_interface_address_list. - */ -static inline void -free_interface_address_list(smartlist_t *addrs) -{ - free_interface_address6_list(addrs); -} +#define interface_address_list_free(lst)\ + interface_address6_list_free(lst) /** Return a smartlist of the IPv4 addresses of all interfaces on the server. * Excludes loopback and multicast addresses. Only includes internal addresses * if include_internal is true. (Note that a relay behind NAT may use an |