chiark / gitweb /
udev: check return value of write
[elogind.git] / src / delta / delta.c
index 01c63353151549ca8dceb8ad0014aa478ae13ead..803d2a7fc798bdc69b86b26e81b7a8b1959ec329 100644 (file)
@@ -176,11 +176,12 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, const char *path) {
         }
 
         for (;;) {
-                struct dirent *de, buf;
+                struct dirent *de;
+                union dirent_storage buf;
                 int k;
                 char *p;
 
-                k = readdir_r(d, &buf, &de);
+                k = readdir_r(d, &buf.de, &de);
                 if (k != 0) {
                         r = -k;
                         goto finish;
@@ -192,7 +193,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, const char *path) {
                 if (!dirent_is_file(de))
                         continue;
 
-                p = join(path, "/", de->d_name, NULL);
+                p = strjoin(path, "/", de->d_name, NULL);
                 if (!p) {
                         r = -ENOMEM;
                         goto finish;
@@ -254,7 +255,7 @@ static int process_suffix(const char *prefixes, const char *suffix) {
         NULSTR_FOREACH(p, prefixes) {
                 char *t;
 
-                t = join(p, "/", suffix, NULL);
+                t = strjoin(p, "/", suffix, NULL);
                 if (!t) {
                         r = -ENOMEM;
                         goto finish;