diff options
author | Florian Weimer <fweimer@redhat.com> | 2013-12-19 11:25:08 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-21 18:35:55 -0500 |
commit | 9fa3006323e86962ceaa3171b906cf2b1c2cf525 (patch) | |
tree | ff77a961d5cc65966d4f80af4bad52e71fa9f4bb /src/core/load-dropin.c | |
parent | 66c7a5332a9ef33143ab57f5f0d1cff0dc4d6ac5 (diff) |
core: replace readdir_r with readdir
Diffstat (limited to 'src/core/load-dropin.c')
-rw-r--r-- | src/core/load-dropin.c | 7 |
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; } |