diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-12-07 10:44:04 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-08 14:47:19 -0500 |
commit | 285632a61b4e4aeec07b26004396473e0d8f4a43 (patch) | |
tree | ec6b0363f3072ba5e5c13ac1fb7cb2fb3c44db50 /src/or/routerlist.h | |
parent | 95531ddfbfb6cb30760523d91fd4dfc966d2f6a5 (diff) | |
download | tor-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/routerlist.h')
-rw-r--r-- | src/or/routerlist.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/routerlist.h b/src/or/routerlist.h index 18f0670ead..ab510dee3f 100644 --- a/src/or/routerlist.h +++ b/src/or/routerlist.h @@ -97,11 +97,11 @@ const char *signed_descriptor_get_body(const signed_descriptor_t *desc); const char *signed_descriptor_get_annotations(const signed_descriptor_t *desc); routerlist_t *router_get_routerlist(void); void routerinfo_free_(routerinfo_t *router); -#define routerinfo_free(router) FREE_AND_NULL(routerinfo, (router)) +#define routerinfo_free(router) FREE_AND_NULL(routerinfo_t, routerinfo_free_, (router)) void extrainfo_free_(extrainfo_t *extrainfo); -#define extrainfo_free(ei) FREE_AND_NULL(extrainfo, (ei)) +#define extrainfo_free(ei) FREE_AND_NULL(extrainfo_t, extrainfo_free_, (ei)) void routerlist_free_(routerlist_t *rl); -#define routerlist_free(rl) FREE_AND_NULL(routerlist, (rl)) +#define routerlist_free(rl) FREE_AND_NULL(routerlist_t, routerlist_free_, (rl)) void dump_routerlist_mem_usage(int severity); void routerlist_remove(routerlist_t *rl, routerinfo_t *ri, int make_old, time_t now); @@ -195,7 +195,7 @@ dir_server_t *fallback_dir_server_new(const tor_addr_t *addr, void dir_server_add(dir_server_t *ent); void authority_cert_free_(authority_cert_t *cert); -#define authority_cert_free(cert) FREE_AND_NULL(authority_cert, (cert)) +#define authority_cert_free(cert) FREE_AND_NULL(authority_cert_t, authority_cert_free_, (cert)) void clear_dir_servers(void); void update_consensus_router_descriptor_downloads(time_t now, int is_vote, networkstatus_t *consensus); |