[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9d60a974-734e-d14a-fa3f-ceab43d2dc0f@gmail.com>
Date: Fri, 11 Sep 2020 09:57:18 +0200
From: "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
To: Alejandro Colomar <colomar.6.4.3@...il.com>
Cc: mtk.manpages@...il.com, linux-man@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/24] timer_create.2: Cast to 'unsigned long' rathen than
'long' when printing with "%lx"
On 9/10/20 11:13 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@...il.com>
Thanks, Alex. Patch Applied.
Cheers,
Michael
> ---
> man2/timer_create.2 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/man2/timer_create.2 b/man2/timer_create.2
> index e9a8b8503..9c9907739 100644
> --- a/man2/timer_create.2
> +++ b/man2/timer_create.2
> @@ -390,7 +390,7 @@ print_siginfo(siginfo_t *si)
> tidp = si\->si_value.sival_ptr;
>
> printf(" sival_ptr = %p; ", si\->si_value.sival_ptr);
> - printf(" *sival_ptr = 0x%lx\en", (long) *tidp);
> + printf(" *sival_ptr = 0x%lx\en", (unsigned long) *tidp);
>
> or = timer_getoverrun(*tidp);
> if (or == \-1)
> @@ -454,7 +454,7 @@ main(int argc, char *argv[])
> if (timer_create(CLOCKID, &sev, &timerid) == \-1)
> errExit("timer_create");
>
> - printf("timer ID is 0x%lx\en", (long) timerid);
> + printf("timer ID is 0x%lx\en", (unsigned long) timerid);
>
> /* Start the timer */
>
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
Powered by blists - more mailing lists