summaryrefslogtreecommitdiff
path: root/src/common/container.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/common/container.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/common/container.h')
-rw-r--r--src/common/container.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/container.h b/src/common/container.h
index 95dfa4c90f..5d2dce5416 100644
--- a/src/common/container.h
+++ b/src/common/container.h
@@ -29,7 +29,7 @@ typedef struct smartlist_t {
MOCK_DECL(smartlist_t *, smartlist_new, (void));
MOCK_DECL(void, smartlist_free_, (smartlist_t *sl));
-#define smartlist_free(sl) FREE_AND_NULL(smartlist, (sl))
+#define smartlist_free(sl) FREE_AND_NULL(smartlist_t, smartlist_free_, (sl))
void smartlist_clear(smartlist_t *sl);
void smartlist_add(smartlist_t *sl, void *element);
@@ -630,7 +630,7 @@ bitarray_free_(bitarray_t *ba)
{
tor_free(ba);
}
-#define bitarray_free(ba) FREE_AND_NULL(bitarray, (ba))
+#define bitarray_free(ba) FREE_AND_NULL(bitarray_t, bitarray_free_, (ba))
/** Set the <b>bit</b>th bit in <b>b</b> to 1. */
static inline void
@@ -694,7 +694,7 @@ digestset_contains(const digestset_t *set, const char *digest)
digestset_t *digestset_new(int max_elements);
void digestset_free_(digestset_t* set);
-#define digestset_free(set) FREE_AND_NULL(digestset, (set))
+#define digestset_free(set) FREE_AND_NULL(digestset_t, digestset_free_, (set))
/* These functions, given an <b>array</b> of <b>n_elements</b>, return the
* <b>nth</b> lowest element. <b>nth</b>=0 gives the lowest element;