X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Flogs-show.c;h=8edf4087c68f337ab76aed2c85f9d9a9dd0448e7;hp=c3578ac9181ca65d63177bf57b3dafbb4210407c;hb=ea30eb86e5a370fb8cb94e352e075e24d940d159;hpb=878cd7e95ca303f9851d227a22d2022bd49944b0 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: