2aacef
From acf4f21936ad6153ba53f2d798967e57473be8bc Mon Sep 17 00:00:00 2001
2aacef
From: Daan De Meyer <daan.j.demeyer@gmail.com>
2aacef
Date: Thu, 23 Feb 2023 15:40:38 +0100
2aacef
Subject: [PATCH] journal-file: Fix return value in bump_entry_array()
2aacef
2aacef
(cherry picked from commit 0399902440fbaea5b163254f70be57dbedb7131e)
2aacef
2aacef
Resolves: #2173682
2aacef
---
2aacef
 src/libsystemd/sd-journal/journal-file.c | 3 ++-
2aacef
 1 file changed, 2 insertions(+), 1 deletion(-)
2aacef
2aacef
diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c
2aacef
index c1ec6bb1d8..c489436a1e 100644
2aacef
--- a/src/libsystemd/sd-journal/journal-file.c
2aacef
+++ b/src/libsystemd/sd-journal/journal-file.c
2aacef
@@ -2410,7 +2410,8 @@ static int bump_entry_array(
2aacef
 
2aacef
         if (direction == DIRECTION_DOWN) {
2aacef
                 assert(o);
2aacef
-                return le64toh(o->entry_array.next_entry_array_offset);
2aacef
+                *ret = le64toh(o->entry_array.next_entry_array_offset);
2aacef
+                return 0;
2aacef
         }
2aacef
 
2aacef
         /* Entry array chains are a singly linked list, so to find the previous array in the chain, we have