aboutsummaryrefslogtreecommitdiff
path: root/src/or/replaycache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/replaycache.h')
-rw-r--r--src/or/replaycache.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/or/replaycache.h b/src/or/replaycache.h
index 64a6caf5f5..81a8d907fd 100644
--- a/src/or/replaycache.h
+++ b/src/or/replaycache.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Tor Project, Inc. */
+/* Copyright (c) 2012-2017, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
@@ -29,11 +29,13 @@ struct replaycache_s {
digest256map_t *digests_seen;
};
-#endif /* REPLAYCACHE_PRIVATE */
+#endif /* defined(REPLAYCACHE_PRIVATE) */
/* replaycache_t free/new */
-void replaycache_free(replaycache_t *r);
+void replaycache_free_(replaycache_t *r);
+#define replaycache_free(r) \
+ FREE_AND_NULL(replaycache_t, replaycache_free_, (r))
replaycache_t * replaycache_new(time_t horizon, time_t interval);
#ifdef REPLAYCACHE_PRIVATE
@@ -51,7 +53,7 @@ STATIC int replaycache_add_and_test_internal(
STATIC void replaycache_scrub_if_needed_internal(
time_t present, replaycache_t *r);
-#endif /* REPLAYCACHE_PRIVATE */
+#endif /* defined(REPLAYCACHE_PRIVATE) */
/*
* replaycache_t methods
@@ -62,5 +64,5 @@ int replaycache_add_test_and_elapsed(
replaycache_t *r, const void *data, size_t len, time_t *elapsed);
void replaycache_scrub_if_needed(replaycache_t *r);
-#endif
+#endif /* !defined(TOR_REPLAYCACHE_H) */