[PATCH] fix to malloc checking
Mike Frysinger
vapier@gentoo.org
Mon Mar 2 03:09:00 GMT 2015
On 04 Feb 2015 13:56, James Lemke wrote:
> --- a/malloc/hooks.c
> +++ b/malloc/hooks.c
>
> +static unsigned char
> +magicbyte (void *p)
could be const
> +{
> + unsigned char magic;
> +
> + magic = (((size_t) p >> 3) ^ ((size_t) p >> 11)) & 0xFF;
shouldn't you use uintptr_t instead of size_t ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150302/43d118e9/attachment.sig>
More information about the Libc-alpha
mailing list