chiark / gitweb /
libsystemd-journal: return 0 on success in get_data()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 Mar 2013 05:40:30 +0000 (00:40 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 Mar 2013 05:45:56 +0000 (00:45 -0500)
The man page says so. Right now 0 would be returned if the data was encrypted,
1 otherwise.

src/journal/journalctl.c
src/journal/sd-journal.c

index cb93fea63b6159b90f974d4bc9a541ae3f471229..c90fecd239e5bc641ea01068569a3361d5363f46 100644 (file)
@@ -1103,7 +1103,7 @@ int main(int argc, char *argv[]) {
                         int flags;
 
                         if (need_seek) {
                         int flags;
 
                         if (need_seek) {
-                                if(!arg_reverse)
+                                if (!arg_reverse)
                                         r = sd_journal_next(j);
                                 else
                                         r = sd_journal_previous(j);
                                         r = sd_journal_next(j);
                                 else
                                         r = sd_journal_previous(j);
index 19123544b34bd5dcd3f31f7b044bd1aea46667be..fa04bfdfc87eb15c6f885ebdffc845ec3b20f633 100644 (file)
@@ -1868,7 +1868,7 @@ _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void **
                         *data = o->data.payload;
                         *size = t;
 
                         *data = o->data.payload;
                         *size = t;
 
-                        return 1;
+                        return 0;
                 }
 
                 r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o);
                 }
 
                 r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o);