projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5d6bf0
)
Add custom TALLOC_ABORT
author
Geoff Levand
<geoff@infradead.org>
Sat, 12 Nov 2011 21:59:18 +0000
(13:59 -0800)
committer
Geoff Levand
<geoff@infradead.org>
Sat, 12 Nov 2011 22:05:31 +0000
(14:05 -0800)
Signed-off-by: Geoff Levand <geoff@infradead.org>
lib/talloc/talloc.c
patch
|
blob
|
history
diff --git
a/lib/talloc/talloc.c
b/lib/talloc/talloc.c
index 95a0a6a0b395a82990170e1efae5227f8fdce544..dd108938759e2629737ddd20e9880642cd390c30 100644
(file)
--- a/
lib/talloc/talloc.c
+++ b/
lib/talloc/talloc.c
@@
-41,6
+41,13
@@
#include <stdlib.h>
#include <string.h>
+#if !defined(NDEBUG)
+#include <assert.h>
+#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 <sys/types.h>
#endif