mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 09:47:06 +00:00
cgroups: move variable into tighter scope
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
c05b17bd66
commit
81b5d48a34
@ -2086,7 +2086,7 @@ on_error:
|
|||||||
__cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops, const char *name,
|
__cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops, const char *name,
|
||||||
const char *lxcpath, pid_t pid)
|
const char *lxcpath, pid_t pid)
|
||||||
{
|
{
|
||||||
int i, len, ret;
|
int len, ret;
|
||||||
char pidstr[INTTYPE_TO_STRLEN(pid_t)];
|
char pidstr[INTTYPE_TO_STRLEN(pid_t)];
|
||||||
|
|
||||||
if (!ops->hierarchies)
|
if (!ops->hierarchies)
|
||||||
@ -2096,7 +2096,7 @@ __cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops, const char *name,
|
|||||||
if (len < 0 || (size_t)len >= sizeof(pidstr))
|
if (len < 0 || (size_t)len >= sizeof(pidstr))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (i = 0; ops->hierarchies[i]; i++) {
|
for (int i = 0; ops->hierarchies[i]; i++) {
|
||||||
__do_free char *fullpath = NULL, *path = NULL;
|
__do_free char *fullpath = NULL, *path = NULL;
|
||||||
struct hierarchy *h = ops->hierarchies[i];
|
struct hierarchy *h = ops->hierarchies[i];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user