summaryrefslogtreecommitdiff
path: root/src/or/confparse.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-21 08:29:42 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-08 14:47:19 -0500
commitb0cc9856ee560865d2668afbff20e8b77986e4ee (patch)
tree3411bb448b33a9f256020784e28aa62fe338b14d /src/or/confparse.h
parentc92ac9f5cbb4440b5f87c7e0dd6bec5147d72405 (diff)
downloadtor-b0cc9856ee560865d2668afbff20e8b77986e4ee.tar.gz
tor-b0cc9856ee560865d2668afbff20e8b77986e4ee.zip
Update free functions into macros: src/or/ part 1
This covers addressmap.h (no change needed) through confparse.h
Diffstat (limited to 'src/or/confparse.h')
-rw-r--r--src/or/confparse.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/confparse.h b/src/or/confparse.h
index 6f0b3b325c..f497f55ac1 100644
--- a/src/or/confparse.h
+++ b/src/or/confparse.h
@@ -177,7 +177,12 @@ typedef struct config_format_t {
#define CAL_WARN_DEPRECATIONS (1u<<2)
void *config_new(const config_format_t *fmt);
-void config_free(const config_format_t *fmt, void *options);
+void config_free_(const config_format_t *fmt, void *options);
+#define config_free(fmt, options) do { \
+ config_free_((fmt), (options)); \
+ (options) = NULL; \
+ } while (0)
+
config_line_t *config_get_assigned_option(const config_format_t *fmt,
const void *options, const char *key,
int escape_val);