X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flogs-show.c;h=5a7bbaf03a92fa08dea2310a406f48ba8cf657b4;hb=d5099efc47d4e6ac60816b5381a5f607ab03f06e;hp=c3578ac9181ca65d63177bf57b3dafbb4210407c;hpb=878cd7e95ca303f9851d227a22d2022bd49944b0;p=elogind.git diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index c3578ac91..5a7bbaf03 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: @@ -695,7 +695,7 @@ static int output_json( sd_id128_to_string(boot_id, sid)); } - h = hashmap_new(string_hash_func, string_compare_func); + h = hashmap_new(&string_hash_ops); if (!h) return -ENOMEM; @@ -1032,7 +1032,7 @@ static int show_journal(FILE *f, if (!(flags & OUTPUT_FOLLOW)) break; - r = sd_journal_wait(j, (usec_t) -1); + r = sd_journal_wait(j, USEC_INFINITY); if (r < 0) goto finish;