]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
delta: replace readdir_r with readdir
authorFlorian Weimer <fweimer@redhat.com>
Thu, 19 Dec 2013 10:16:12 +0000 (11:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 21 Dec 2013 23:35:55 +0000 (18:35 -0500)
src/delta/delta.c

index 0785e7b5e7ca466b516feea2019db260a561ee04..a26af02b7a21142ec3aea13fdf458b926f6ae43b 100644 (file)
@@ -280,13 +280,13 @@ 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;
+                errno = 0;
+                de = readdir(d);
+                if (!de && errno != 0)
+                        return -errno;
 
                 if (!de)
                         break;