diff options
| author | Alejandro Colomar <colomar.6.4.3@gmail.com> | 2020-09-12 12:06:41 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-13 08:07:05 +0200 |
| commit | 6fd153d5401c728539f6237449241418fb1197cc (patch) | |
| tree | 0248e3b173636665727b33f055953f0919079f5b | |
| parent | f6fbffeae5277cd2a8ea038aacef4907c3f75b96 (diff) | |
| download | man-pages-6fd153d5401c728539f6237449241418fb1197cc.tar.gz | |
clock_getres.2: Cast 'time_t' to 'int' for printf() and fix the length modifiers
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Reviewed-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/clock_getres.2 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/man2/clock_getres.2 b/man2/clock_getres.2 index 8fc7c6fef8..0c14203ee4 100644 --- a/man2/clock_getres.2 +++ b/man2/clock_getres.2 @@ -491,8 +491,10 @@ displayClock(clockid_t clock, char *name, bool showRes) if (days > 0) printf("%ld days + ", days); - printf("%2ldh %2ldm %2lds", (ts.tv_sec % SECS_IN_DAY) / 3600, - (ts.tv_sec % 3600) / 60, ts.tv_sec % 60); + printf("%2dh %2dm %2ds", + (int) (ts.tv_sec % SECS_IN_DAY) / 3600, + (int) (ts.tv_sec % 3600) / 60, + (int) ts.tv_sec % 60); printf(")\en"); if (clock_getres(clock, &ts) == \-1) { |
