summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.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/networkstatus.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/networkstatus.h')
-rw-r--r--src/or/networkstatus.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h
index 37350bb1b3..93fde8c2ce 100644
--- a/src/or/networkstatus.h
+++ b/src/or/networkstatus.h
@@ -19,10 +19,10 @@ 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);
-#define routerstatus_free(rs) FREE_AND_NULL(routerstatus, (rs))
+#define routerstatus_free(rs) FREE_AND_NULL(routerstatus_t, routerstatus_free_, (rs))
void networkstatus_vote_free_(networkstatus_t *ns);
#define networkstatus_vote_free(ns) \
- FREE_AND_NULL_UNMATCHED(networkstatus_t, networkstatus_vote_free_, (ns))
+ FREE_AND_NULL(networkstatus_t, networkstatus_vote_free_, (ns))
networkstatus_voter_info_t *networkstatus_get_voter_by_id(
networkstatus_t *vote,
const char *identity);
@@ -128,13 +128,13 @@ int32_t networkstatus_get_bw_weight(networkstatus_t *ns, const char *weight,
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);
-#define document_signature_free(sig) FREE_AND_NULL(document_signature, (sig))
+#define document_signature_free(sig) FREE_AND_NULL(document_signature_t, document_signature_free_, (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);
-#define vote_routerstatus_free(rs) FREE_AND_NULL(vote_routerstatus, (rs))
+#define vote_routerstatus_free(rs) FREE_AND_NULL(vote_routerstatus_t, vote_routerstatus_free_, (rs))
#ifdef NETWORKSTATUS_PRIVATE
#ifdef TOR_UNIT_TESTS