]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/machine-image.c
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / shared / machine-image.c
index d97b522bdb28f4011e4efc9ce7f8dcb0f48b0da5..a259b1830100296a96ef07ebfeb9e018cffb64d8 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 /***
-  This file is part of systemd.
-
   Copyright 2013 Lennart Poettering
 ***/
 
@@ -170,7 +168,7 @@ static int image_new(
         if (!i->path)
                 return -ENOMEM;
 
-        path_kill_slashes(i->path);
+        path_simplify(i->path, false);
 
         *ret = TAKE_PTR(i);
 
@@ -1100,7 +1098,6 @@ int image_read_metadata(Image *i) {
                 sd_id128_t machine_id = SD_ID128_NULL;
                 _cleanup_free_ char *hostname = NULL;
                 _cleanup_free_ char *path = NULL;
-                _cleanup_fclose_ FILE *f = NULL;
 
                 r = chase_symlinks("/etc/hostname", i->path, CHASE_PREFIX_ROOT|CHASE_TRAIL_SLASH, &path);
                 if (r < 0 && r != -ENOENT)