1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

talloc: add a define for TALLOC_MAX_DEPTH

Thanks to the suggestion from simo
This commit is contained in:
Andrew Tridgell 2010-04-02 18:17:52 +11:00
parent 5ccd30e9ac
commit 1b4bbec523
2 changed files with 5 additions and 1 deletions

View File

@ -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);
}

View File

@ -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