From 4d8548297911835bd0cc1f57f066e50a21fa45c8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Thu, 27 Sep 2012 23:28:54 +0200 Subject: [PATCH] sd-journal: properly parse cursor strings (cherry picked from commit be3ea5eaf24f4507efe88b450f751da860a9d21c) --- src/journal/sd-journal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 5a82fbd..05b9484 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -816,35 +816,35 @@ _public_ int sd_journal_seek_cursor(sd_journal *j, const char *cursor) { case 's': seqnum_id_set = true; - k = sd_id128_from_string(w+2, &seqnum_id); + k = sd_id128_from_string(item+2, &seqnum_id); break; case 'i': seqnum_set = true; - if (sscanf(w+2, "%llx", &seqnum) != 1) + if (sscanf(item+2, "%llx", &seqnum) != 1) k = -EINVAL; break; case 'b': boot_id_set = true; - k = sd_id128_from_string(w+2, &boot_id); + k = sd_id128_from_string(item+2, &boot_id); break; case 'm': monotonic_set = true; - if (sscanf(w+2, "%llx", &monotonic) != 1) + if (sscanf(item+2, "%llx", &monotonic) != 1) k = -EINVAL; break; case 't': realtime_set = true; - if (sscanf(w+2, "%llx", &realtime) != 1) + if (sscanf(item+2, "%llx", &realtime) != 1) k = -EINVAL; break; case 'x': xor_hash_set = true; - if (sscanf(w+2, "%llx", &xor_hash) != 1) + if (sscanf(item+2, "%llx", &xor_hash) != 1) k = -EINVAL; break; }