summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-11-23 10:26:14 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-12-01 05:54:22 +0100
commit48c897f126b68c1bc5b5b05e203e65fa1dc89390 (patch)
tree60cc62c1b9aa9974367a1b4f3e918687bc5587c9 /lib
parent032e25fdc6f5f9c59ead471bc01ad62ae7383d81 (diff)
downloadsamba-48c897f126b68c1bc5b5b05e203e65fa1dc89390.tar.gz
talloc: clarify that talloc_magic never includes the bits in TALLOC_FLAG_MASK
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'lib')
-rw-r--r--lib/talloc/talloc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index a097ce088df..279021c137a 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -80,9 +80,10 @@
#define TALLOC_MAGIC_BASE 0xe814ec70
static unsigned int talloc_magic = (
- TALLOC_MAGIC_BASE +
- (TALLOC_VERSION_MAJOR << 12) +
- (TALLOC_VERSION_MINOR << 4));
+ ~TALLOC_FLAG_MASK & (
+ TALLOC_MAGIC_BASE +
+ (TALLOC_VERSION_MAJOR << 12) +
+ (TALLOC_VERSION_MINOR << 4)));
/* by default we abort when given a bad pointer (such as when talloc_free() is called
on a pointer that came from malloc() */