From 507f22bd0172bff5e5d98145b1419bd472a2c57f Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 5 Jun 2013 18:44:16 -0400 Subject: Use stdint.h macros instead of casts to print uint64_t values Casts are visually heavy, and can obscure unwanted truncations. --- src/journal/sd-journal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/journal/sd-journal.c') diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 8b9a589cd3..8986763e4d 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -979,11 +979,11 @@ _public_ int sd_journal_get_cursor(sd_journal *j, char **cursor) { sd_id128_to_string(o->entry.boot_id, bid); if (asprintf(cursor, - "s=%s;i=%llx;b=%s;m=%llx;t=%llx;x=%llx", - sid, (unsigned long long) le64toh(o->entry.seqnum), - bid, (unsigned long long) le64toh(o->entry.monotonic), - (unsigned long long) le64toh(o->entry.realtime), - (unsigned long long) le64toh(o->entry.xor_hash)) < 0) + "s=%s;i=%"PRIx64";b=%s;m=%"PRIx64";t=%"PRIx64";x=%"PRIx64, + sid, le64toh(o->entry.seqnum), + bid, le64toh(o->entry.monotonic), + le64toh(o->entry.realtime), + le64toh(o->entry.xor_hash)) < 0) return -ENOMEM; return 0; -- cgit v1.2.3-54-g00ecf