]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: fix error values
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Feb 2021 21:48:40 +0000 (22:48 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Feb 2021 21:48:56 +0000 (22:48 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index bf8d4d67a02ab21fcda43f5de2806e3b4007fb83..d1db8f0fb87fa30365a5a1bf6cc556874fdbbd92 100644 (file)
@@ -1050,11 +1050,11 @@ static int __cgroup_tree_create(int dfd_base, const char *path, mode_t mode,
        char buf[PATH_MAX];
 
        if (is_empty_string(path))
-               return ret_errno(-EINVAL);
+               return ret_errno(EINVAL);
 
        len = strlcpy(buf, path, sizeof(buf));
        if (len >= sizeof(buf))
-               return -E2BIG;
+               return ret_errno(E2BIG);
 
        lxc_iterate_parts(cur, buf, "/") {
                /*