summaryrefslogtreecommitdiff
path: root/src/journal/journal-vacuum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journal-vacuum.c')
-rw-r--r--src/journal/journal-vacuum.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index d4a1c6c933..b2b47d69b2 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -180,9 +180,7 @@ int journal_directory_vacuum(
return -errno;
for (;;) {
- int k;
struct dirent *de;
- union dirent_storage buf;
size_t q;
struct stat st;
char *p;
@@ -190,9 +188,10 @@ int journal_directory_vacuum(
sd_id128_t seqnum_id;
bool have_seqnum;
- k = readdir_r(d, &buf.de, &de);
- if (k != 0) {
- r = -k;
+ errno = 0;
+ de = readdir(d);
+ if (!de && errno != 0) {
+ r = -errno;
goto finish;
}