aboutsummaryrefslogtreecommitdiff
path: root/src/common/container.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-08 10:21:12 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-08 14:47:19 -0500
commitfa0d24286b1dac3959c338f6b76fc15dbe1559e5 (patch)
tree5ec27cfa8b633cc6729bbb7da9eface2541ccb28 /src/common/container.c
parent17dcce3fe11bfea9c7c46d2b9fd5baeb63ebe1e2 (diff)
downloadtor-fa0d24286b1dac3959c338f6b76fc15dbe1559e5.tar.gz
tor-fa0d24286b1dac3959c338f6b76fc15dbe1559e5.zip
Convert remaining function (mostly static) to new free style
Diffstat (limited to 'src/common/container.c')
-rw-r--r--src/common/container.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/common/container.c b/src/common/container.c
index a6e3c11f35..54b0b2028f 100644
--- a/src/common/container.c
+++ b/src/common/container.c
@@ -1163,19 +1163,26 @@ HT_GENERATE2(digest256map_impl, digest256map_entry_t, node,
digest256map_entry_hash,
digest256map_entries_eq, 0.6, tor_reallocarray_, tor_free_)
+#define strmap_entry_free(ent) \
+ FREE_AND_NULL(strmap_entry_t, strmap_entry_free_, (ent))
+#define digestmap_entry_free(ent) \
+ FREE_AND_NULL(digestmap_entry_t, digestmap_entry_free_, (ent))
+#define digest256map_entry_free(ent) \
+ FREE_AND_NULL(digest256map_entry_t, digest256map_entry_free_, (ent))
+
static inline void
-strmap_entry_free(strmap_entry_t *ent)
+strmap_entry_free_(strmap_entry_t *ent)
{
tor_free(ent->key);
tor_free(ent);
}
static inline void
-digestmap_entry_free(digestmap_entry_t *ent)
+digestmap_entry_free_(digestmap_entry_t *ent)
{
tor_free(ent);
}
static inline void
-digest256map_entry_free(digest256map_entry_t *ent)
+digest256map_entry_free_(digest256map_entry_t *ent)
{
tor_free(ent);
}