diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-21 09:37:47 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-08 14:47:19 -0500 |
commit | 176ad729d9b1ddeccdb3e721b5ab1bf64646223f (patch) | |
tree | be4ff3e62b459859c7c87bf663a37e3806eac8f9 /src/or/networkstatus.h | |
parent | 0792cc107ef588b9f9fa27165b73e19fbf07e92b (diff) | |
download | tor-176ad729d9b1ddeccdb3e721b5ab1bf64646223f.tar.gz tor-176ad729d9b1ddeccdb3e721b5ab1bf64646223f.zip |
Change the free macro convention in the rest of src/or/*.h
Diffstat (limited to 'src/or/networkstatus.h')
-rw-r--r-- | src/or/networkstatus.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h index 39a0f753d8..f62b5d2409 100644 --- a/src/or/networkstatus.h +++ b/src/or/networkstatus.h @@ -18,8 +18,10 @@ void networkstatus_reset_warnings(void); void networkstatus_reset_download_failures(void); char *networkstatus_read_cached_consensus(const char *flavorname); int router_reload_consensus_networkstatus(void); -void routerstatus_free(routerstatus_t *rs); -void networkstatus_vote_free(networkstatus_t *ns); +void routerstatus_free_(routerstatus_t *rs); +#define routerstatus_free(rs) FREE_AND_NULL(routerstatus, (rs)) +void networkstatus_vote_free_(networkstatus_t *ns); +#define networkstatus_vote_free(ns) FREE_AND_NULL(networkstatus_vote, (ns)) networkstatus_voter_info_t *networkstatus_get_voter_by_id( networkstatus_t *vote, const char *identity); @@ -124,12 +126,14 @@ int32_t networkstatus_get_bw_weight(networkstatus_t *ns, const char *weight, int32_t default_val); const char *networkstatus_get_flavor_name(consensus_flavor_t flav); int networkstatus_parse_flavor_name(const char *flavname); -void document_signature_free(document_signature_t *sig); +void document_signature_free_(document_signature_t *sig); +#define document_signature_free(sig) FREE_AND_NULL(document_signature, (sig)) document_signature_t *document_signature_dup(const document_signature_t *sig); void networkstatus_free_all(void); int networkstatus_get_weight_scale_param(networkstatus_t *ns); -void vote_routerstatus_free(vote_routerstatus_t *rs); +void vote_routerstatus_free_(vote_routerstatus_t *rs); +#define vote_routerstatus_free(rs) FREE_AND_NULL(vote_routerstatus, (rs)) #ifdef NETWORKSTATUS_PRIVATE #ifdef TOR_UNIT_TESTS |