talloc: use TC_HDR_SIZE instead of sizeof(struct talloc_chunk)
authorStefan Metzmacher <metze@samba.org>
Thu, 31 Mar 2011 13:18:55 +0000 (15:18 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 8 Apr 2011 07:28:09 +0000 (09:28 +0200)
As this includes the padding to 16 bytes.

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
lib/talloc/talloc.c

index c616f3458c8b4faa44eb3be9d116b70fb27c1024..1c5f76922ad6499b4bf653f7e5527c6aaf66082b 100644 (file)
@@ -334,7 +334,7 @@ _PUBLIC_ const char *talloc_parent_name(const void *ptr)
 
 static unsigned int *talloc_pool_objectcount(struct talloc_chunk *tc)
 {
-       return (unsigned int *)((char *)tc + sizeof(struct talloc_chunk));
+       return (unsigned int *)((char *)tc + TC_HDR_SIZE);
 }
 
 /*