From 78a5d04dd61e4a4708c5c017b05724561639e657 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 19 Dec 2013 12:15:58 +0100 Subject: journal/vacuum: replace readdir_r with readdir --- src/journal/journal-vacuum.c | 9 ++++----- 1 file 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; } -- cgit v1.2.3-54-g00ecf