From: Geoff Levand Date: Sat, 12 Nov 2011 21:59:18 +0000 (-0800) Subject: Add custom TALLOC_ABORT X-Git-Tag: v1.0.0~813 X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=c75e362781057bc982799d300eebfd47417ad23e Add custom TALLOC_ABORT Signed-off-by: Geoff Levand --- 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