Skip to content

Commit

Permalink
cgroups: fix error values
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 17, 2021
1 parent 2c4348b commit bce0406
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/cgroups/cgfsng.c
Expand Up @@ -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, "/") {
/*
Expand Down

0 comments on commit bce0406

Please sign in to comment.