]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/environment-d-generator/environment-d-generator.c
Merge pull request #10984 from fbuihuu/tmpfiles-be-more-explicit-with-unsafe-transition
[thirdparty/systemd.git] / src / environment-d-generator / environment-d-generator.c
index bb4d76da900f0b5d401717500a5cd1bdad8981f1..9d64d95738c4eabb708848b2bb42b4eef193d198 100644 (file)
@@ -1,29 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-  This file is part of systemd.
-
-  Copyright 2017 Zbigniew JÄ™drzejewski-Szmek
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
 
 #include "sd-path.h"
 
 #include "conf-files.h"
 #include "def.h"
+#include "env-file.h"
 #include "escape.h"
-#include "fileio.h"
 #include "log.h"
 #include "path-lookup.h"
 
@@ -45,8 +27,7 @@ static int environment_dirs(char ***ret) {
         if (r < 0)
                 return r;
 
-        *ret = dirs;
-        dirs = NULL;
+        *ret = TAKE_PTR(dirs);
         return 0;
 }