From 99613ec5d7f0c6e30801457f60c2cab7d8e50d8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 7 Mar 2013 00:40:30 -0500 Subject: [PATCH] libsystemd-journal: return 0 on success in get_data() The man page says so. Right now 0 would be returned if the data was encrypted, 1 otherwise. --- src/journal/journalctl.c | 2 +- src/journal/sd-journal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index cb93fea..c90fecd 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -1103,7 +1103,7 @@ int main(int argc, char *argv[]) { int flags; if (need_seek) { - if(!arg_reverse) + if (!arg_reverse) r = sd_journal_next(j); else r = sd_journal_previous(j); diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 1912354..fa04bfd 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1868,7 +1868,7 @@ _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void ** *data = o->data.payload; *size = t; - return 1; + return 0; } r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o); -- 2.7.4