summaryrefslogtreecommitdiff
path: root/src/tmpfiles/tmpfiles.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2013-12-19 12:26:07 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-21 18:35:55 -0500
commitd78096b343400d7a9f513a55b76c8de28adb2e08 (patch)
tree82a2462fcdfa8874645c0dab3fe306df5c3ec668 /src/tmpfiles/tmpfiles.c
parent016284c352084cdbf856905704070c1f30970f58 (diff)
tmpfiles: replace readdir_r with readdir
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r--src/tmpfiles/tmpfiles.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index b7f6a2e058..e83a73e279 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -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;
}