diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-21 09:37:47 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-08 14:47:19 -0500 |
commit | 176ad729d9b1ddeccdb3e721b5ab1bf64646223f (patch) | |
tree | be4ff3e62b459859c7c87bf663a37e3806eac8f9 /src/or/fp_pair.h | |
parent | 0792cc107ef588b9f9fa27165b73e19fbf07e92b (diff) | |
download | tor-176ad729d9b1ddeccdb3e721b5ab1bf64646223f.tar.gz tor-176ad729d9b1ddeccdb3e721b5ab1bf64646223f.zip |
Change the free macro convention in the rest of src/or/*.h
Diffstat (limited to 'src/or/fp_pair.h')
-rw-r--r-- | src/or/fp_pair.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/fp_pair.h b/src/or/fp_pair.h index f7c060b459..4498a16101 100644 --- a/src/or/fp_pair.h +++ b/src/or/fp_pair.h @@ -26,7 +26,12 @@ void * fp_pair_map_get(const fp_pair_map_t *map, const fp_pair_t *key); void * fp_pair_map_get_by_digests(const fp_pair_map_t *map, const char *first, const char *second); void * fp_pair_map_remove(fp_pair_map_t *map, const fp_pair_t *key); -void fp_pair_map_free(fp_pair_map_t *map, void (*free_val)(void*)); +void fp_pair_map_free_(fp_pair_map_t *map, void (*free_val)(void*)); +#define fp_pair_map_free(map, free_val) do { \ + fp_pair_map_free_((map), (free_val)); \ + (map) = NULL; \ + } while (0) + int fp_pair_map_isempty(const fp_pair_map_t *map); int fp_pair_map_size(const fp_pair_map_t *map); fp_pair_map_iter_t * fp_pair_map_iter_init(fp_pair_map_t *map); |