]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
timerfd_create.2: Use 'PRIxN' macros when printing C99 fixed-width integer types
authorAlejandro Colomar <colomar.6.4.3@gmail.com>
Thu, 10 Sep 2020 21:13:24 +0000 (23:13 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 11 Sep 2020 09:33:28 +0000 (11:33 +0200)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/timerfd_create.2

index 67a13dba35abd9f154c11571c73ee04bda21b5a8..90e35d9b56716a9913cbbe223faa1b064ee1c7b4 100644 (file)
@@ -624,6 +624,7 @@ a.out 3 1 100
 #include <sys/timerfd.h>
 #include <time.h>
 #include <unistd.h>
+#include <inttypes.h>      /* Definition of PRIu64 */
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>        /* Definition of uint64_t */
@@ -706,9 +707,7 @@ main(int argc, char *argv[])
 
         tot_exp += exp;
         print_elapsed_time();
-        printf("read: %llu; total=%llu\en",
-                (unsigned long long) exp,
-                (unsigned long long) tot_exp);
+        printf("read: %"PRIu64"; total=%"PRIu64"\en", exp, tot_exp);
     }
 
     exit(EXIT_SUCCESS);