summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-04 07:26:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:12 -0500
commitab65303fe8e7123b1567e9159adbfd6bd4697e78 (patch)
tree7e47e8cf5f243f00c15c9f4a40bd9fb8e1d0329d /source4
parentb9e8935188c75a007683979b208757e6c5c7aa67 (diff)
downloadsamba-ab65303fe8e7123b1567e9159adbfd6bd4697e78.tar.gz
samba-ab65303fe8e7123b1567e9159adbfd6bd4697e78.tar.bz2
samba-ab65303fe8e7123b1567e9159adbfd6bd4697e78.zip
r8127: fixed code in function error
(This used to be commit 46632e2048f0b87de351cd3f26229cfc4b3384ca)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/talloc/talloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index 1081302d09..6af08a2ac9 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -111,8 +111,7 @@ struct talloc_chunk {
static struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr)
{
const char *pp = ptr;
- pp -= TC_HDR_SIZE;
- struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp);
+ struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp - TC_HDR_SIZE);
if ((tc->flags & ~0xF) != TALLOC_MAGIC) {
TALLOC_ABORT("Bad talloc magic value - unknown value");
}