From 5823b09a1cea71b3809f530c26b3f2b57b71c1ed Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 27 Mar 2009 00:48:22 +0000 Subject: Squash warning svn path=/trunk/netsurf/; revision=6904 --- utils/talloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/talloc.c b/utils/talloc.c index c60c6a58f..985bba93b 100644 --- a/utils/talloc.c +++ b/utils/talloc.c @@ -131,8 +131,8 @@ struct talloc_chunk { /* panic if we get a bad magic value */ static inline struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr) { - const char *pp = (const char *)ptr; - struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp - TC_HDR_SIZE); + const void *pp = ((const char *)ptr) - TC_HDR_SIZE; + struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp); if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~0xF)) != TALLOC_MAGIC)) { if (tc->flags & TALLOC_FLAG_FREE) { TALLOC_ABORT("Bad talloc magic value - double free"); -- cgit v1.2.3