diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/journalctl.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 54ee6d8cc8..58ca8071fc 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -917,14 +917,9 @@ int main(int argc, char *argv[]) { } for (;;) { - for (;;) { + while (arg_lines == 0 || n_shown < arg_lines) { int flags; - if (arg_lines > 0 && n_shown >= arg_lines) { - r = 0; - goto finish; - } - if (need_seek) { r = sd_journal_next(j); if (r < 0) { |