summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/logs-show.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index e1119224e2..426a9d617c 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -639,7 +639,7 @@ int show_journal_by_unit(
if (r < 0)
goto finish;
- if (not_before < cutoff)
+ if (r > 0 && not_before < cutoff)
printf("Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.\n");
warn_cutoff = false;