mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 13:41:31 +00:00
tmpfiles: replace readdir_r with readdir
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
016284c352
commit
d78096b343
@@ -543,15 +543,15 @@ static int recursive_relabel_children(Item *i, const char *path) {
|
||||
|
||||
for (;;) {
|
||||
struct dirent *de;
|
||||
union dirent_storage buf;
|
||||
bool is_dir;
|
||||
int r;
|
||||
_cleanup_free_ char *entry_path = NULL;
|
||||
|
||||
r = readdir_r(d, &buf.de, &de);
|
||||
if (r != 0) {
|
||||
errno = 0;
|
||||
de = readdir(d);
|
||||
if (!de && errno != 0) {
|
||||
if (ret == 0)
|
||||
ret = -r;
|
||||
ret = -errno;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user