Re: [PATCH 02/12] malloc_hook.3: Remove unneeded cast, and print 'size_t' with "%zu"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/12/20 1:14 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>

Thanks, Alex. Patch applied.

Cheers,

Michael

> ---
>  man3/malloc_hook.3 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3
> index a509dc72f..fb45e30f2 100644
> --- a/man3/malloc_hook.3
> +++ b/man3/malloc_hook.3
> @@ -130,8 +130,8 @@ my_malloc_hook(size_t size, const void *caller)
>      old_malloc_hook = __malloc_hook;
>  
>      /* printf() might call malloc(), so protect it too. */
> -    printf("malloc(%u) called from %p returns %p\en",
> -            (unsigned int) size, caller, result);
> +    printf("malloc(%zu) called from %p returns %p\en",
> +            size, caller, result);
>  
>      /* Restore our own hooks */
>      __malloc_hook = my_malloc_hook;
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux