Commit 64725769 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

cgroup: drop useless name variable in collect_cgroups

It looks like, it's completely not needed here.

criu/cgroup.c:582:4: warning: Value stored to 'name' is never read
                        name = cc->name + 5;
                        ^      ~~~~~~~~~~~~
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 40a37ae7
......@@ -547,7 +547,7 @@ static int collect_cgroups(struct list_head *ctls)
list_for_each_entry(cc, ctls, l) {
char path[PATH_MAX], mopts[1024];
char *name, prefix[] = ".criu.cgmounts.XXXXXX";
char prefix[] = ".criu.cgmounts.XXXXXX";
struct cg_controller *cg;
current_controller = NULL;
......@@ -578,13 +578,10 @@ static int collect_cgroups(struct list_head *ctls)
if (!opts.manage_cgroups)
continue;
if (strstartswith(cc->name, "name=")) {
name = cc->name + 5;
if (strstartswith(cc->name, "name="))
snprintf(mopts, sizeof(mopts), "none,%s", cc->name);
} else {
name = cc->name;
snprintf(mopts, sizeof(mopts), "%s", name);
}
else
snprintf(mopts, sizeof(mopts), "%s", cc->name);
if (mkdtemp(prefix) == NULL) {
pr_perror("can't make dir for cg mounts");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment