diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-12-07 10:44:04 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-08 14:47:19 -0500 |
commit | 285632a61b4e4aeec07b26004396473e0d8f4a43 (patch) | |
tree | ec6b0363f3072ba5e5c13ac1fb7cb2fb3c44db50 /src/or/entrynodes.h | |
parent | 95531ddfbfb6cb30760523d91fd4dfc966d2f6a5 (diff) | |
download | tor-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/entrynodes.h')
-rw-r--r-- | src/or/entrynodes.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index 5fd4c970db..32fcfeadfb 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -477,7 +477,7 @@ STATIC double get_extreme_restriction_threshold(void); HANDLE_DECL(entry_guard, entry_guard_t, STATIC) #define entry_guard_handle_free(h) \ - FREE_AND_NULL(entry_guard_handle, (h)) + FREE_AND_NULL(entry_guard_handle_t, entry_guard_handle_free_, (h)) STATIC guard_selection_type_t guard_selection_infer_type( guard_selection_type_t type_in, @@ -487,7 +487,7 @@ STATIC guard_selection_t *guard_selection_new(const char *name, STATIC guard_selection_t *get_guard_selection_by_name( const char *name, guard_selection_type_t type, int create_if_absent); STATIC void guard_selection_free_(guard_selection_t *gs); -#define guard_selection_free(gs) FREE_AND_NULL(guard_selection, (gs)) +#define guard_selection_free(gs) FREE_AND_NULL(guard_selection_t, guard_selection_free_, (gs)) MOCK_DECL(STATIC int, entry_guard_is_listed, (guard_selection_t *gs, const entry_guard_t *guard)); STATIC const char *choose_guard_selection(const or_options_t *options, @@ -573,7 +573,7 @@ STATIC entry_guard_restriction_t *guard_create_dirserver_md_restriction(void); STATIC void entry_guard_restriction_free_(entry_guard_restriction_t *rst); #define entry_guard_restriction_free(rst) \ - FREE_AND_NULL(entry_guard_restriction, (rst)) + FREE_AND_NULL(entry_guard_restriction_t, entry_guard_restriction_free_, (rst)) #endif /* defined(ENTRYNODES_PRIVATE) */ |