diff options
author | Florian Weimer <fweimer@redhat.com> | 2013-12-19 12:15:58 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-21 18:35:55 -0500 |
commit | 78a5d04dd61e4a4708c5c017b05724561639e657 (patch) | |
tree | 8a1969e0e763ba8af2ded3b571efd1ef87cc932f | |
parent | 3fd11280e82f590eaeda1e3945dafadf82cd8727 (diff) |
journal/vacuum: replace readdir_r with readdir
-rw-r--r-- | src/journal/journal-vacuum.c | 9 |
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; } |