From 1cce779d7723da5dc1ad68b5f7715e6ea3bfb0b8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 22 Jun 2001 01:56:16 +0000 Subject: the BAD_PTR idea in talloc.h is actually a bad idea - it means callers have no way of telling if the call really failed (This used to be commit 7a96ca313e2f6b5ad8a713babd3cac0bbcc4c399) --- source3/lib/talloc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 4c263ec4d6..85dd7b5b12 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -55,13 +55,7 @@ void *talloc(TALLOC_CTX *t, size_t size) void *p; struct talloc_chunk *tc; - if (size == 0) { - /* debugging value used to track down - memory problems. BAD_PTR is defined - in talloc.h */ - p = BAD_PTR; - return p; - } + if (size == 0) return NULL; p = malloc(size); if (!p) return p; -- cgit