]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/dropin.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / shared / dropin.c
index 15ccd1b6cac8f75541cc3e67278729007c66f041..a16f436bede7e41a1938510a23f6be2a3a6d0385 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -187,7 +188,7 @@ int unit_file_find_dropin_paths(
                 Set *names,
                 char ***ret) {
 
-        _cleanup_strv_free_ char **dirs = NULL, **ans = NULL;
+        _cleanup_strv_free_ char **dirs = NULL;
         Iterator i;
         char *t, **p;
         int r;
@@ -203,12 +204,9 @@ int unit_file_find_dropin_paths(
                 return 0;
         }
 
-        r = conf_files_list_strv(&ans, file_suffix, NULL, (const char**) dirs);
+        r = conf_files_list_strv(ret, file_suffix, NULL, 0, (const char**) dirs);
         if (r < 0)
-                return log_warning_errno(r, "Failed to sort the list of configuration files: %m");
-
-        *ret = ans;
-        ans = NULL;
+                return log_warning_errno(r, "Failed to create the list of configuration files: %m");
 
         return 1;
 }