diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-02 18:17:52 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-02 18:52:29 +1100 |
commit | 1b4bbec523f2bf20d91c177e7fdb4b7f87431926 (patch) | |
tree | 2e646b674500556b1ead09052efbfbd6bcfd37a0 /lib | |
parent | 5ccd30e9ac5cb93a79c076c22709e271d34d9483 (diff) | |
download | samba-1b4bbec523f2bf20d91c177e7fdb4b7f87431926.tar.gz samba-1b4bbec523f2bf20d91c177e7fdb4b7f87431926.tar.bz2 samba-1b4bbec523f2bf20d91c177e7fdb4b7f87431926.zip |
talloc: add a define for TALLOC_MAX_DEPTH
Thanks to the suggestion from simo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/talloc/talloc.c | 2 | ||||
-rw-r--r-- | lib/talloc/talloc.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 51a002369c..51273dd612 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -1999,5 +1999,5 @@ static int _talloc_is_parent(const void *context, const void *ptr, int depth) */ int talloc_is_parent(const void *context, const void *ptr) { - return _talloc_is_parent(context, ptr, 10000); + return _talloc_is_parent(context, ptr, TALLOC_MAX_DEPTH); } diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index 4adc206d12..a98cff4d2e 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -1591,4 +1591,8 @@ void talloc_set_log_stderr(void); #define talloc_append_string(c, s, a) (s?talloc_strdup_append(s,a):talloc_strdup(c, a)) #endif +#ifndef TALLOC_MAX_DEPTH +#define TALLOC_MAX_DEPTH 10000 +#endif + #endif |