summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-27 23:28:54 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-28 00:55:24 +0200
commitbe3ea5eaf24f4507efe88b450f751da860a9d21c (patch)
treeefc19b61b1b5d14cd442add84dadbb88f02a1e53 /src/journal
parent08ace05beb1d09b6ebc5e9cafc2b972b39fa2437 (diff)
sd-journal: properly parse cursor strings
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/sd-journal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index acde84fe2d..05a8445b37 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -983,35 +983,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;
}