From 609e002e78e79ef2bf9d6a6ea22bda215abbbb14 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 22 May 2014 11:44:03 +0900 Subject: time-util: make sure USEC_PER_SEC and friends are actually of type usec_t --- src/shared/logs-show.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared/logs-show.c') diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index c3578ac91..8edf4087c 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -301,8 +301,8 @@ static int output_short( } fprintf(f, "[%5llu.%06llu]", - t / USEC_PER_SEC, - t % USEC_PER_SEC); + (unsigned long long) (t / USEC_PER_SEC), + (unsigned long long) (t % USEC_PER_SEC)); n += 1 + 5 + 1 + 6 + 1; @@ -335,7 +335,7 @@ static int output_short( r = strftime(buf, sizeof(buf), "%b %d %H:%M:%S", localtime_r(&t, &tm)); if (r > 0) { snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - ".%06llu", x % USEC_PER_SEC); + ".%06llu", (unsigned long long) (x % USEC_PER_SEC)); } break; default: -- cgit v1.2.3