diff options
author | Jeremy Allison <jra@samba.org> | 2002-12-20 20:23:06 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-12-20 20:23:06 +0000 |
commit | 7f23546730e49569d41a5edd0c47bb559c4f812d (patch) | |
tree | 7d7d2229881b2e9f05130a07c6cb2dd912c89098 /source3/lib | |
parent | 45a6532727888c710d537c6e1e03466af2a87881 (diff) | |
download | samba-7f23546730e49569d41a5edd0c47bb559c4f812d.tar.gz samba-7f23546730e49569d41a5edd0c47bb559c4f812d.tar.bz2 samba-7f23546730e49569d41a5edd0c47bb559c4f812d.zip |
Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 842e08e52a665ae678eea239759bb2de1a0d7b33)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/talloc.c | 6 | ||||
-rw-r--r-- | source3/lib/tallocmsg.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 5fffe58f9f..f0c13753b5 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -117,7 +117,7 @@ static void talloc_disenroll(TALLOC_CTX *t) /** Create a new talloc context. **/ -TALLOC_CTX *talloc_init(void) +static TALLOC_CTX *talloc_init_internal(void) { TALLOC_CTX *t; @@ -139,12 +139,12 @@ TALLOC_CTX *talloc_init(void) * Please call this in preference to talloc_init(). **/ - TALLOC_CTX *talloc_init_named(char const *fmt, ...) + TALLOC_CTX *talloc_init(char const *fmt, ...) { TALLOC_CTX *t; va_list ap; - t = talloc_init(); + t = talloc_init_internal(); if (t && fmt) { /* * t->name must not be talloced. diff --git a/source3/lib/tallocmsg.c b/source3/lib/tallocmsg.c index 608cdad452..bbe1ee60a4 100644 --- a/source3/lib/tallocmsg.c +++ b/source3/lib/tallocmsg.c @@ -34,7 +34,7 @@ void msg_pool_usage(int msg_type, pid_t src_pid, void *UNUSED(buf), size_t UNUSED(len)) { char *reply; - TALLOC_CTX *reply_pool = talloc_init_named("msg_pool_usage"); + TALLOC_CTX *reply_pool = talloc_init("msg_pool_usage"); SMB_ASSERT(msg_type == MSG_REQ_POOL_USAGE); |