summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2013-12-19 11:25:08 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-21 18:35:55 -0500
commit9fa3006323e86962ceaa3171b906cf2b1c2cf525 (patch)
treeff77a961d5cc65966d4f80af4bad52e71fa9f4bb
parent66c7a5332a9ef33143ab57f5f0d1cff0dc4d6ac5 (diff)
core: replace readdir_r with readdir
-rw-r--r--src/core/load-dropin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c
index a877e66098..35040090ac 100644
--- a/src/core/load-dropin.c
+++ b/src/core/load-dropin.c
@@ -63,12 +63,13 @@ static int iterate_dir(
for (;;) {
struct dirent *de;
- union dirent_storage buf;
_cleanup_free_ char *f = NULL;
int k;
- k = readdir_r(d, &buf.de, &de);
- if (k != 0) {
+ errno = 0;
+ de = readdir(d);
+ if (!de && errno != 0) {
+ k = errno;
log_error("Failed to read directory %s: %s", path, strerror(k));
return -k;
}