aboutsummaryrefslogtreecommitdiff
path: root/src/or/policies.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-07 10:44:04 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-08 14:47:19 -0500
commit285632a61b4e4aeec07b26004396473e0d8f4a43 (patch)
treeec6b0363f3072ba5e5c13ac1fb7cb2fb3c44db50 /src/or/policies.h
parent95531ddfbfb6cb30760523d91fd4dfc966d2f6a5 (diff)
downloadtor-285632a61b4e4aeec07b26004396473e0d8f4a43.tar.gz
tor-285632a61b4e4aeec07b26004396473e0d8f4a43.zip
Replace all FREE_AND_NULL* uses to take a type and a free function.
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
Diffstat (limited to 'src/or/policies.h')
-rw-r--r--src/or/policies.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/policies.h b/src/or/policies.h
index 451a7a7f36..55bf9012b3 100644
--- a/src/or/policies.h
+++ b/src/or/policies.h
@@ -117,9 +117,9 @@ int policy_write_item(char *buf, size_t buflen, const addr_policy_t *item,
void addr_policy_list_free_(smartlist_t *p);
#define addr_policy_list_free(lst) \
- FREE_AND_NULL_UNMATCHED(smartlist_t, addr_policy_list_free_, (lst))
+ FREE_AND_NULL(smartlist_t, addr_policy_list_free_, (lst))
void addr_policy_free_(addr_policy_t *p);
-#define addr_policy_free(p) FREE_AND_NULL(addr_policy, (p))
+#define addr_policy_free(p) FREE_AND_NULL(addr_policy_t, addr_policy_free_, (p))
void policies_free_all(void);
char *policy_summarize(smartlist_t *policy, sa_family_t family);
@@ -127,7 +127,7 @@ char *policy_summarize(smartlist_t *policy, sa_family_t family);
short_policy_t *parse_short_policy(const char *summary);
char *write_short_policy(const short_policy_t *policy);
void short_policy_free_(short_policy_t *policy);
-#define short_policy_free(p) FREE_AND_NULL(short_policy, (p))
+#define short_policy_free(p) FREE_AND_NULL(short_policy_t, short_policy_free_, (p))
int short_policy_is_reject_star(const short_policy_t *policy);
addr_policy_result_t compare_tor_addr_to_short_policy(
const tor_addr_t *addr, uint16_t port,