X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftal%2Ftal.h;h=1ed15c75f46fd664b6f57b10c65bcd8eb9790406;hp=3a0481455ae1da5356a8905820190d03702d47eb;hb=bb480e553f9d204b85a2e42de0be42c7b80eebda;hpb=e03d7ecb505cb73ff244708323b0f1a5a0c5cd7a diff --git a/ccan/tal/tal.h b/ccan/tal/tal.h index 3a048145..1ed15c75 100644 --- a/ccan/tal/tal.h +++ b/ccan/tal/tal.h @@ -304,7 +304,7 @@ static inline size_t tal_sizeof_(size_t size, size_t count) #if HAVE_STATEMENT_EXPR /* Careful: ptr can be const foo *, ptype is foo *. Also, ptr could * be an array, eg "hello". */ -#define tal_typechk_(ptr, ptype) ({ __typeof__(&*(ptr)) _p = (ptype)(ptr); _p; }) +#define tal_typechk_(ptr, ptype) ({ __typeof__((ptr)+0) _p = (ptype)(ptr); _p; }) #else #define tal_typechk_(ptr, ptype) (ptr) #endif