summaryrefslogtreecommitdiff
path: root/src/journal/journal-vacuum.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2013-12-19 12:15:58 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-21 18:35:55 -0500
commit78a5d04dd61e4a4708c5c017b05724561639e657 (patch)
tree8a1969e0e763ba8af2ded3b571efd1ef87cc932f /src/journal/journal-vacuum.c
parent3fd11280e82f590eaeda1e3945dafadf82cd8727 (diff)
journal/vacuum: replace readdir_r with readdir
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;
}