1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-25 06:03:40 +03:00

journal/vacuum: replace readdir_r with readdir

This commit is contained in:
Florian Weimer 2013-12-19 12:15:58 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 3fd11280e8
commit 78a5d04dd6

View File

@ -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;
}