Samba 4 [PATCH 1/1] Add talloc_get_type_abort as a macro
azez at ufomechanic.net
Fri Feb 1 13:05:00 GMT 2008
This was diff'd on Samba 4 but should apply to Samba 3 with context fixes.
Based on vlendec's talloc_get_type_abort, but implemented
as a macro to avoid changing libtalloc api, and to make it
easier to pass __location__
TALLOC_ABORT(why) must be defined before talloc_get_type_abort
is used, for samba clients I suggest:
#define TALLOC_ABORT(why) smb_panic(why)
after all the other includes.
The only bug is that the talloc_asprintf allocated error
message must be free'd by the ABORT function, but as that
will typically quit the process it doesn't really matter.
Signed-off-by: Amin Azez <azez at ufomechanic.net>
source/lib/talloc/talloc.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 877 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080201/72e14639/f6b434cbd3c9fcdf29036caed94ea96e1f1b342d.bin
More information about the samba-technical