From ab65303fe8e7123b1567e9159adbfd6bd4697e78 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 4 Jul 2005 07:26:27 +0000 Subject: r8127: fixed code in function error (This used to be commit 46632e2048f0b87de351cd3f26229cfc4b3384ca) --- source4/lib/talloc/talloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4') 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"); } -- cgit