]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: mount_entry_on_systemfs()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 1 Aug 2017 20:15:56 +0000 (22:15 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 1 Aug 2017 20:16:12 +0000 (22:16 +0200)
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index ce9507e991dc870d1f2f3d68f498d4eae07f7fc1..f9ed38c3342e2a7a3094991a99575b6bad9fc98d 100644 (file)
@@ -1904,20 +1904,18 @@ static inline int mount_entry_on_generic(struct mntent *mntent,
 
 static inline int mount_entry_on_systemfs(struct mntent *mntent)
 {
-       char path[MAXPATHLEN];
        int ret;
+       char path[MAXPATHLEN];
 
        /* For containers created without a rootfs all mounts are treated as
-        * absolute paths starting at / on the host. */
+        * absolute paths starting at / on the host.
+        */
        if (mntent->mnt_dir[0] != '/')
                ret = snprintf(path, sizeof(path), "/%s", mntent->mnt_dir);
        else
                ret = snprintf(path, sizeof(path), "%s", mntent->mnt_dir);
-
-       if (ret < 0 || ret >= sizeof(path)) {
-               ERROR("path name too long");
+       if (ret < 0 || ret >= sizeof(path))
                return -1;
-       }
 
        return mount_entry_on_generic(mntent, path, NULL, NULL, NULL);
 }