timer_create.2: Cast to 'unsigned long' rather than 'long' when printing with "%lx"

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2020-09-10 23:13:27 +02:00 committed by Michael Kerrisk
parent c9e2544b17
commit 3996bc9c26
1 changed files with 2 additions and 2 deletions

View File

@ -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 */