[systemd-devel] [PATCH 03/11] delta: replace readdir_r with readdir

Florian Weimer fweimer at redhat.com
Thu Dec 19 02:16:12 PST 2013


---
 src/delta/delta.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/delta/delta.c b/src/delta/delta.c
index 0785e7b..dcf25d1 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -280,13 +280,12 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
 
         for (;;) {
                 struct dirent *de;
-                union dirent_storage buf;
                 int k;
                 char *p;
 
-                k = readdir_r(d, &buf.de, &de);
-                if (k != 0)
-                        return -k;
+                de = readdir(d);
+                if (!de && errno != 0)
+                        return -errno;
 
                 if (!de)
                         break;
-- 
1.8.3.1



More information about the systemd-devel mailing list