1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

r8127: fixed code in function error

(This used to be commit 46632e2048)
This commit is contained in:
Andrew Tridgell 2005-07-04 07:26:27 +00:00 committed by Gerald (Jerry) Carter
parent b9e8935188
commit ab65303fe8

View File

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