summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-06-05 18:44:16 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-06-10 10:10:07 -0400
commit507f22bd0172bff5e5d98145b1419bd472a2c57f (patch)
treeb8873279314be8faed250aa8d8c76cb0f9434112 /src/journal/sd-journal.c
parentb32ff512191bf873266ee8067f6f6c8a30c96a5e (diff)
Use stdint.h macros instead of casts to print uint64_t values
Casts are visually heavy, and can obscure unwanted truncations.
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c10
1 files changed, 5 insertions, 5 deletions
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;