From c75e362781057bc982799d300eebfd47417ad23e Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Sat, 12 Nov 2011 13:59:18 -0800 Subject: Add custom TALLOC_ABORT Signed-off-by: Geoff Levand --- lib/talloc/talloc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 95a0a6a..dd10893 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -41,6 +41,13 @@ #include #include +#if !defined(NDEBUG) +#include +#define TALLOC_ABORT(reason) do{ \ + fprintf(stderr, "%s: name: %s\n", __func__, tc->name); \ + assert(0 && reason);} while (0) +#endif + #ifdef HAVE_SYS_TYPES_H #include #endif -- cgit v1.2.1