|
@@ -121,11 +121,8 @@ void tor_log_mallinfo(int severity);
|
|
|
|
|
|
/* Helper macro: free a variable of type 'typename' using freefn, and
|
|
|
* set the variable to NULL.
|
|
|
- *
|
|
|
- * We use this for legacy cases when freefn and typename don't line up
|
|
|
- * perfectly.
|
|
|
*/
|
|
|
-#define FREE_AND_NULL_UNMATCHED(typename, freefn, var) \
|
|
|
+#define FREE_AND_NULL(typename, freefn, var) \
|
|
|
do { \
|
|
|
/* only evaluate (var) once. */ \
|
|
|
typename **tmp__free__ptr ## freefn = &(var); \
|
|
@@ -133,11 +130,6 @@ void tor_log_mallinfo(int severity);
|
|
|
(*tmp__free__ptr ## freefn) = NULL; \
|
|
|
} while (0)
|
|
|
|
|
|
-/* Helper macro: free a variable of type 'type' using type_free_, and
|
|
|
- * set the variable to NULL. */
|
|
|
-#define FREE_AND_NULL(type, var) \
|
|
|
- FREE_AND_NULL_UNMATCHED(type ## _t, type ## _free_, (var))
|
|
|
-
|
|
|
/** Macro: yield a pointer to the field at position <b>off</b> within the
|
|
|
* structure <b>st</b>. Example:
|
|
|
* <pre>
|