diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-06-22 01:56:16 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-06-22 01:56:16 +0000 |
commit | 7a96ca313e2f6b5ad8a713babd3cac0bbcc4c399 (patch) | |
tree | 3d8cb39cd7417c75861830ae1311503cb3cf8655 /source/lib/talloc.c | |
parent | f179e0ff61794073aedcf77544865ad2f18c6e6d (diff) | |
download | samba-7a96ca313e2f6b5ad8a713babd3cac0bbcc4c399.tar.gz samba-7a96ca313e2f6b5ad8a713babd3cac0bbcc4c399.tar.xz samba-7a96ca313e2f6b5ad8a713babd3cac0bbcc4c399.zip |
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
Diffstat (limited to 'source/lib/talloc.c')
-rw-r--r-- | source/lib/talloc.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/lib/talloc.c b/source/lib/talloc.c index 4c263ec4d61..85dd7b5b12d 100644 --- a/source/lib/talloc.c +++ b/source/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; |