From: Stefan Metzmacher Date: Thu, 5 Dec 2013 07:36:13 +0000 (+0100) Subject: talloc: check for TALLOC_GET_TYPE_ABORT_NOOP X-Git-Tag: samba-4.0.26~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2396a6ee2adcb9ab68e91995cbe44dac7381cea;p=thirdparty%2Fsamba.git talloc: check for TALLOC_GET_TYPE_ABORT_NOOP Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (cherry picked from commit eb95fc8866dd1710b4cc2f4a4e1dc9867424def2) --- diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index 0d47d23b2ff..5ece54ddaa4 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -761,7 +761,11 @@ type *talloc_get_type(const void *ptr, #type); */ void *talloc_get_type_abort(const void *ptr, #type); #else +#ifdef TALLOC_GET_TYPE_ABORT_NOOP +#define talloc_get_type_abort(ptr, type) (type *)(ptr) +#else #define talloc_get_type_abort(ptr, type) (type *)_talloc_get_type_abort(ptr, #type, __location__) +#endif void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location); #endif