aboutsummaryrefslogtreecommitdiff
path: root/rt/tst-clock.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-12-19 14:00:59 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-12-30 08:07:50 -0800
commit5d619de4610fa00d0b633e1916c49e59824440ff (patch)
treef47278e52def825767fbf4a451dae0eb1ec602bf /rt/tst-clock.c
parent6490d945378090db82be2759ff66719a980d9c1c (diff)
downloadglibc-5d619de4610fa00d0b633e1916c49e59824440ff.zip
glibc-5d619de4610fa00d0b633e1916c49e59824440ff.tar.gz
glibc-5d619de4610fa00d0b633e1916c49e59824440ff.tar.bz2
Replace %ld/%lu with %jd/%ju and cast to intmax_t/uintmax_t
Diffstat (limited to 'rt/tst-clock.c')
-rw-r--r--rt/tst-clock.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/rt/tst-clock.c b/rt/tst-clock.c
index f6133f5..1cfdcfe 100644
--- a/rt/tst-clock.c
+++ b/rt/tst-clock.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
+#include <stdint.h>
/* We want to see output immediately. */
@@ -51,8 +52,8 @@ clock_test (clockid_t cl)
result = 1;
}
else
- printf ("clock %d: resolution = %ld.%09ld secs\n",
- cl, ts.tv_sec, ts.tv_nsec);
+ printf ("clock %d: resolution = %jd.%09jd secs\n",
+ cl, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec);
}
else
{
@@ -76,8 +77,8 @@ clock_test (clockid_t cl)
}
else
{
- printf ("clock %d: time = %ld.%09ld secs\n",
- cl, ts.tv_sec, ts.tv_nsec);
+ printf ("clock %d: time = %jd.%09jd secs\n",
+ cl, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec);
if (memcmp (&ts, &old_ts, sizeof ts) == 0)
{