chiark / gitweb /
Modernization
[elogind.git] / src / shared / install.c
index 9722ed4e1c7df42057f02d58c940f2a68cfab5c6..5a780fe915f1a3ad41bbb7e0a20b0a95ed08b7d0 100644 (file)
@@ -1874,6 +1874,7 @@ static void unitfilelist_free(UnitFileList **f) {
         free((*f)->path);
         free(*f);
 }
+#define _cleanup_unitfilelist_free_ _cleanup_(unitfilelist_free)
 
 int unit_file_get_list(
                 UnitFileScope scope,
@@ -1925,8 +1926,7 @@ int unit_file_get_list(
                 for (;;) {
                         struct dirent *de;
                         union dirent_storage buffer;
-                        UnitFileList __attribute__((cleanup(unitfilelist_free)))
-                                *f = NULL;
+                        _cleanup_unitfilelist_free_ UnitFileList *f = NULL;
 
                         r = readdir_r(d, &buffer.de, &de);
                         if (r != 0)