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:
parent
3fd11280e8
commit
78a5d04dd6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user